summaryrefslogtreecommitdiff
path: root/lib-src/update-game-score.c
diff options
context:
space:
mode:
authorThien-Thi Nguyen <ttn@gnuvola.org>2004-05-08 15:26:33 +0000
committerThien-Thi Nguyen <ttn@gnuvola.org>2004-05-08 15:26:33 +0000
commit65396510c3ff5e5386560d586cb117f6a9d06c27 (patch)
treee1240e2d08ba9f72fe44e62318c67c3065913d1c /lib-src/update-game-score.c
parent28712a21247d1a503e7620e47c128c0fc33b3bb3 (diff)
downloademacs-65396510c3ff5e5386560d586cb117f6a9d06c27.tar.gz
Throughout, replace 0 destined for `exit' arg with `EXIT_SUCCESS'.
Likewise, replace 1 with `EXIT_FAILURE'. (main): Use `EXIT_SUCCESS' or `EXIT_FAILURE' for return value.
Diffstat (limited to 'lib-src/update-game-score.c')
-rw-r--r--lib-src/update-game-score.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/lib-src/update-game-score.c b/lib-src/update-game-score.c
index 74fa2b06920..8f7c90cad55 100644
--- a/lib-src/update-game-score.c
+++ b/lib-src/update-game-score.c
@@ -111,7 +111,7 @@ lose (msg)
const char *msg;
{
fprintf (stderr, "%s\n", msg);
- exit (1);
+ exit (EXIT_FAILURE);
}
void lose_syserr P_ ((const char *msg)) NO_RETURN;
@@ -138,7 +138,7 @@ lose_syserr (msg)
const char *msg;
{
fprintf (stderr, "%s: %s\n", msg, strerror (errno));
- exit (1);
+ exit (EXIT_FAILURE);
}
char *
@@ -199,7 +199,7 @@ main (argc, argv)
switch (c)
{
case 'h':
- usage (0);
+ usage (EXIT_SUCCESS);
break;
case 'd':
user_prefix = optarg;
@@ -213,11 +213,11 @@ main (argc, argv)
max = MAX_SCORES;
break;
default:
- usage (1);
+ usage (EXIT_FAILURE);
}
if (optind+3 != argc)
- usage (1);
+ usage (EXIT_FAILURE);
running_suid = (getuid () != geteuid ());
@@ -266,7 +266,7 @@ main (argc, argv)
lose_syserr ("Failed to write scores file");
}
unlock_file (scorefile, lockstate);
- exit (0);
+ exit (EXIT_SUCCESS);
}
int
@@ -531,3 +531,5 @@ unlock_file (filename, state)
/* arch-tag: 2bf5c52e-4beb-463a-954e-c58b9c64736b
(do not change this comment) */
+
+/* update-game-score.c ends here */