Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 30 Apr 1999 19:10:01 -0700 (PDT)
From:      "Daniel C. Sobral" <dcs@newsguy.com>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: kern/11411: code typo in clones.c: "if ((mpu_config = NULL))" should  be "if ((mpu_config != NULL))"
Message-ID:  <199905010210.TAA01473@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/11411; it has been noted by GNATS.

From: "Daniel C. Sobral" <dcs@newsguy.com>
To: cpeterso@cs.washington.edu
Cc: freebsd-gnats-submit@FreeBSD.ORG,
	Luigi Rizzo <luigi@labinfo.iet.unipi.it>
Subject: Re: kern/11411: code typo in clones.c: "if ((mpu_config = NULL))" should 
 be "if ((mpu_config != NULL))"
Date: Sat, 01 May 1999 10:57:47 +0900

 cpeterso@cs.washington.edu wrote:
 > 
 > >Description:
 > i386/isa/snd/clones.c (line 217):       if (X=0) 3:
 >         if((mpu_config=NULL))
 
 > should be:
 >         if ((mpu_config != NULL)) {
 
 Not exactly. Man style.
 
 That said... The double parenthesis on the above line do nothing
 except *HIDE* the error! That is, supposing it *is* an error (I
 cannot conceive it not being one)... This is just the kind of thing
 that should *not* be done (thoughless "fix" of warnings).
 
 Now, that said... It is all the better that it is written this way.
 If your changes were to be committed, it would introduce a bug.
 
 See, mpu_config is a local variable, and it is *not* static, and it
 has *not* been initialized. So, the above line initializes it, and,
 at the same time, executes the correct branch of the code. After
 your changes, we would risk values being initialized from structure
 elements of an unitialized pointer.
 
 --
 Daniel C. Sobral			(8-DCS)
 dcs@newsguy.com
 dcs@freebsd.org
 
 	"Proof of Trotsky's farsightedness if that _none_ of his
 predictions have come true yet."
 


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199905010210.TAA01473>