diff options
author | Bernhard Reutner-Fischer | 2008-05-19 09:29:47 +0000 |
---|---|---|
committer | Bernhard Reutner-Fischer | 2008-05-19 09:29:47 +0000 |
commit | 636a1f85e89432601c59cdc3239fc867b4adf051 (patch) | |
tree | d43c9ca120c29bf2d4567b1bb0674c6a8bae2b6d /loginutils | |
parent | cb83abd7b6b052224c1f3b998e863aac76914afd (diff) | |
download | busybox-636a1f85e89432601c59cdc3239fc867b4adf051.zip busybox-636a1f85e89432601c59cdc3239fc867b4adf051.tar.gz |
- use EXIT_{SUCCESS,FAILURE}. No object-code changes
Diffstat (limited to 'loginutils')
-rw-r--r-- | loginutils/getty.c | 4 | ||||
-rw-r--r-- | loginutils/login.c | 10 | ||||
-rw-r--r-- | loginutils/vlock.c | 2 |
3 files changed, 8 insertions, 8 deletions
diff --git a/loginutils/getty.c b/loginutils/getty.c index 5e16182..f022aec 100644 --- a/loginutils/getty.c +++ b/loginutils/getty.c @@ -423,7 +423,7 @@ static char *get_logname(char *logname, unsigned size_logname, /* Do not report trivial EINTR/EIO errors. */ if (read(0, &c, 1) < 1) { if (errno == EINTR || errno == EIO) - exit(0); + exit(EXIT_SUCCESS); bb_perror_msg_and_die("%s: read", op->tty); } @@ -475,7 +475,7 @@ static char *get_logname(char *logname, unsigned size_logname, } break; case CTL('D'): - exit(0); + exit(EXIT_SUCCESS); default: if (!isascii(ascval) || !isprint(ascval)) { /* ignore garbage characters */ diff --git a/loginutils/login.c b/loginutils/login.c index e8fe74e..900a7c0 100644 --- a/loginutils/login.c +++ b/loginutils/login.c @@ -130,7 +130,7 @@ static void die_if_nologin(void) fclose(fp); } else puts("\r\nSystem closed for routine maintenance\r"); - exit(1); + exit(EXIT_FAILURE); } #else static ALWAYS_INLINE void die_if_nologin(void) {} @@ -178,18 +178,18 @@ static void get_username_or_die(char *buf, int size_buf) /* skip whitespace */ do { c = getchar(); - if (c == EOF) exit(1); + if (c == EOF) exit(EXIT_FAILURE); if (c == '\n') { - if (!--cntdown) exit(1); + if (!--cntdown) exit(EXIT_FAILURE); goto prompt; } } while (isspace(c)); *buf++ = c; if (!fgets(buf, size_buf-2, stdin)) - exit(1); + exit(EXIT_FAILURE); if (!strchr(buf, '\n')) - exit(1); + exit(EXIT_FAILURE); while (isgraph(*buf)) buf++; *buf = '\0'; } diff --git a/loginutils/vlock.c b/loginutils/vlock.c index 96c1f67..3ce40dd 100644 --- a/loginutils/vlock.c +++ b/loginutils/vlock.c @@ -102,5 +102,5 @@ int vlock_main(int argc ATTRIBUTE_UNUSED, char **argv) ioctl(STDIN_FILENO, VT_SETMODE, &ovtm); tcsetattr(STDIN_FILENO, TCSANOW, &oterm); - fflush_stdout_and_exit(0); + fflush_stdout_and_exit(EXIT_SUCCESS); } |