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 f8e8488fb432ec73de66f06d229b13190fde8ab6..345bf0e87940ca8f1d3d7b7bb68076b5196b5b35 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");
        }