ping: use |=, not =, when combine option bit mask
[oweals/busybox.git] / loginutils / login.c
index c3e31d05d9e0d9fe81de97be4f42e017e532e309..7a6f246adbf2b882ce6fc40bfd7ec9e4968fd394 100644 (file)
@@ -137,7 +137,7 @@ static void die_if_nologin(void)
                puts("\r\nSystem closed for routine maintenance\r");
 
        fclose(fp);
-       fflush(NULL);
+       fflush_all();
        /* Users say that they do need this prior to exit: */
        tcdrain(STDOUT_FILENO);
        exit(EXIT_FAILURE);
@@ -175,7 +175,7 @@ static void initselinux(char *username, char *full_tty,
                return;
 
        if (get_default_context(username, NULL, user_sid)) {
-               bb_error_msg_and_die("cannot get SID for %s", username);
+               bb_error_msg_and_die("can't get SID for %s", username);
        }
        if (getfilecon(full_tty, &old_tty_sid) < 0) {
                bb_perror_msg_and_die("getfilecon(%s) failed", full_tty);
@@ -250,7 +250,7 @@ static void motd(void)
 
        fd = open(bb_path_motd_file, O_RDONLY);
        if (fd >= 0) {
-               fflush(stdout);
+               fflush_all();
                bb_copyfd_eof(fd, STDOUT_FILENO);
                close(fd);
        }
@@ -263,7 +263,7 @@ static void alarm_handler(int sig UNUSED_PARAM)
         * We don't want to block here */
        ndelay_on(1);
        printf("\r\nLogin timed out after %d seconds\r\n", TIMEOUT);
-       fflush(NULL);
+       fflush_all();
        /* unix API is brain damaged regarding O_NONBLOCK,
         * we should undo it, or else we can affect other processes */
        ndelay_off(1);