summaryrefslogtreecommitdiff
path: root/src/logname.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2002-08-31 08:52:10 +0000
committerJim Meyering <jim@meyering.net>2002-08-31 08:52:10 +0000
commit4006f4e672123e0189e58d4f76b58d06ae30eb94 (patch)
tree8a56a42aaa14b061c6181b43d9b3c6d78de83f5b /src/logname.c
parent74887031996e79df07dae9711f08d80839b31e62 (diff)
downloadcoreutils-4006f4e672123e0189e58d4f76b58d06ae30eb94.tar.xz
Change `exit (0)' to `exit (EXIT_SUCCESS)',
`exit (1)' to `exit (EXIT_FAILURE)', and `usage (1)' to `usage (EXIT_FAILURE)'.
Diffstat (limited to 'src/logname.c')
-rw-r--r--src/logname.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/logname.c b/src/logname.c
index b3fe3eb17..d86fab0e8 100644
--- a/src/logname.c
+++ b/src/logname.c
@@ -1,5 +1,5 @@
/* logname -- print user's login name
- Copyright (C) 1990-1997, 1999, 2000, 2001 Free Software Foundation, Inc.
+ Copyright (C) 1990-1997, 1999-2002 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -81,21 +81,21 @@ main (int argc, char **argv)
break;
default:
- usage (1);
+ usage (EXIT_FAILURE);
}
}
if (argc - optind != 0)
- usage (1);
+ usage (EXIT_FAILURE);
/* POSIX requires using getlogin (or equivalent code). */
cp = getlogin ();
if (cp)
{
puts (cp);
- exit (0);
+ exit (EXIT_SUCCESS);
}
/* POSIX prohibits using a fallback technique. */
fprintf (stderr, _("%s: no login name\n"), argv[0]);
- exit (1);
+ exit (EXIT_FAILURE);
}