syslogd: fix shmat error check
authorDenis Vlasenko <vda.linux@googlemail.com>
Mon, 7 Jan 2008 15:58:02 +0000 (15:58 -0000)
committerDenis Vlasenko <vda.linux@googlemail.com>
Mon, 7 Jan 2008 15:58:02 +0000 (15:58 -0000)
sysklogd/syslogd.c

index f8e8488..345bf0e 100644 (file)
@@ -218,7 +218,7 @@ static void ipcsyslog_init(void)
        }
 
        G.shbuf = shmat(G.shmid, NULL, 0);
-       if (!G.shbuf) {
+       if (G.shbuf == (void*) -1L) { /* shmat has bizarre error return */
                bb_perror_msg_and_die("shmat");
        }