summaryrefslogtreecommitdiffstats
path: root/sys/kern/sysv_msg.c
diff options
context:
space:
mode:
authordg <dg@FreeBSD.org>1994-09-17 13:24:29 +0000
committerdg <dg@FreeBSD.org>1994-09-17 13:24:29 +0000
commit88bd88b7a08c637b5d4f91001df5ea3e2b20ef4b (patch)
treebb422f24de529062253c85a420d7b5dd1ec74bc6 /sys/kern/sysv_msg.c
parenta9cbb4294c69a9d8cc6f8813b32af6cc2ff87e06 (diff)
downloadFreeBSD-src-88bd88b7a08c637b5d4f91001df5ea3e2b20ef4b.zip
FreeBSD-src-88bd88b7a08c637b5d4f91001df5ea3e2b20ef4b.tar.gz
Got rid of compiler warnings.
Diffstat (limited to 'sys/kern/sysv_msg.c')
-rw-r--r--sys/kern/sysv_msg.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/sys/kern/sysv_msg.c b/sys/kern/sysv_msg.c
index 0d68840..cdd9226 100644
--- a/sys/kern/sysv_msg.c
+++ b/sys/kern/sysv_msg.c
@@ -1,4 +1,4 @@
-/* $Id$ */
+/* $Id: sysv_msg.c,v 1.1 1994/09/13 14:46:57 dfr Exp $ */
/*
* Implementation of SVID messages
@@ -37,7 +37,7 @@ int nfree_msgmaps; /* # of free map entries */
short free_msgmaps; /* head of linked list of free map entries */
struct msg *free_msghdrs; /* list of free msg headers */
-int
+void
msginit()
{
register int i;
@@ -288,7 +288,7 @@ msgget(p, uap, retval)
int key = uap->key;
int msgflg = uap->msgflg;
struct ucred *cred = p->p_ucred;
- register struct msqid_ds *msqptr;
+ register struct msqid_ds *msqptr = NULL;
#ifdef MSG_DEBUG_OK
printf("msgget(0x%x, 0%o)\n", key, msgflg);
@@ -450,7 +450,7 @@ msgsnd(p, uap, retval)
* (inside this loop in case msg_qbytes changes while we sleep)
*/
- if (msgsz < 0 || msgsz > msqptr->msg_qbytes) {
+ if (msgsz > msqptr->msg_qbytes) {
#ifdef MSG_DEBUG_OK
printf("msgsz > msqptr->msg_qbytes\n");
#endif
@@ -774,13 +774,6 @@ msgrcv(p, uap, retval)
return(eval);
}
- if (msgsz < 0) {
-#ifdef MSG_DEBUG_OK
- printf("msgsz < 0\n");
-#endif
- return(EINVAL);
- }
-
msghdr = NULL;
while (msghdr == NULL) {
if (msgtyp == 0) {
OpenPOWER on IntegriCloud