Subject: kern/380: nit in sys/sys/mbuf.h
To: None <gnats-admin>
From: Bill Sommerfeld <sommerfeld@orchard.medford.ma.us>
List: netbsd-bugs
Date: 08/02/1994 16:50:07
>Number:         380
>Category:       kern
>Synopsis:       nit in mbuf.h
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    gnats-admin (Kernel Bug People)
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Tue Aug  2 16:50:05 1994
>Originator:     Bill Sommerfeld
>Organization:
	none
>Release:        1.0BETA
>Environment:
	
System: NetBSD orchard.medford.ma.us 1.0-ALPHA NetBSD 1.0-ALPHA (ORCHARD) #4: Fri Jul 22 10:36:08 EDT 1994 root@orchard.medford.ma.us:/u1/nsys/sys/arch/i386/compile/ORCHARD i386


>Description:
	gcc -Wall complains
	warning: suggest parentheses around assignment used as truth value
	
	.. which I traced back to the MCLALLOC() macro in mbuf.h

>How-To-Repeat:
	compile driver using MCLGET() macro using -Wall..

>Fix:

*** mbuf.h~	Tue Jul 19 06:06:55 1994
--- mbuf.h	Tue Aug  2 19:24:27 1994
***************
*** 216,222 ****
  	MBUFLOCK( \
  	  if (mclfree == 0) \
  		(void)m_clalloc(1, (how)); \
! 	  if ((p) = (caddr_t)mclfree) { \
  		++mclrefcnt[mtocl(p)]; \
  		mbstat.m_clfree--; \
  		mclfree = ((union mcluster *)(p))->mcl_next; \
--- 216,222 ----
  	MBUFLOCK( \
  	  if (mclfree == 0) \
  		(void)m_clalloc(1, (how)); \
! 	  if (((p) = (caddr_t)mclfree) != 0) { \
  		++mclrefcnt[mtocl(p)]; \
  		mbstat.m_clfree--; \
  		mclfree = ((union mcluster *)(p))->mcl_next; \
>Audit-Trail:
>Unformatted:


------------------------------------------------------------------------------