diff options
author | trasz <trasz@FreeBSD.org> | 2010-12-02 01:14:45 +0000 |
---|---|---|
committer | trasz <trasz@FreeBSD.org> | 2010-12-02 01:14:45 +0000 |
commit | 234ab3f0356ccf170c37d91adc8adf9d1312e63e (patch) | |
tree | 5d809dccb5d9c8fef28217bfc45d29e2d7f60ae6 /sys/kern/sysv_msg.c | |
parent | ae5fd63399d612d2bd80c7d55f2d85e207dd1e2e (diff) | |
download | FreeBSD-src-234ab3f0356ccf170c37d91adc8adf9d1312e63e.zip FreeBSD-src-234ab3f0356ccf170c37d91adc8adf9d1312e63e.tar.gz |
Remove useless NULL checks for M_WAITOK mallocs.
Diffstat (limited to 'sys/kern/sysv_msg.c')
-rw-r--r-- | sys/kern/sysv_msg.c | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/sys/kern/sysv_msg.c b/sys/kern/sysv_msg.c index 01d7f79..dbd50b1 100644 --- a/sys/kern/sysv_msg.c +++ b/sys/kern/sysv_msg.c @@ -200,18 +200,10 @@ msginit() TUNABLE_INT_FETCH("kern.ipc.msgtql", &msginfo.msgtql); msgpool = malloc(msginfo.msgmax, M_MSG, M_WAITOK); - if (msgpool == NULL) - panic("msgpool is NULL"); msgmaps = malloc(sizeof(struct msgmap) * msginfo.msgseg, M_MSG, M_WAITOK); - if (msgmaps == NULL) - panic("msgmaps is NULL"); msghdrs = malloc(sizeof(struct msg) * msginfo.msgtql, M_MSG, M_WAITOK); - if (msghdrs == NULL) - panic("msghdrs is NULL"); msqids = malloc(sizeof(struct msqid_kernel) * msginfo.msgmni, M_MSG, M_WAITOK); - if (msqids == NULL) - panic("msqids is NULL"); /* * msginfo.msgssz should be a power of two for efficiency reasons. @@ -233,9 +225,6 @@ msginit() panic("msginfo.msgseg > 32767"); } - if (msgmaps == NULL) - panic("msgmaps is NULL"); - for (i = 0; i < msginfo.msgseg; i++) { if (i > 0) msgmaps[i-1].next = i; @@ -244,9 +233,6 @@ msginit() free_msgmaps = 0; nfree_msgmaps = msginfo.msgseg; - if (msghdrs == NULL) - panic("msghdrs is NULL"); - for (i = 0; i < msginfo.msgtql; i++) { msghdrs[i].msg_type = 0; if (i > 0) @@ -258,9 +244,6 @@ msginit() } free_msghdrs = &msghdrs[0]; - if (msqids == NULL) - panic("msqids is NULL"); - for (i = 0; i < msginfo.msgmni; i++) { msqids[i].u.msg_qbytes = 0; /* implies entry is available */ msqids[i].u.msg_perm.seq = 0; /* reset to a known value */ |