Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!cbosgd!ulysses!allegra!mit-eddie!think!harvard!seismo!lll-crg!lll-lcc!ucdavis!deneb!cccsam From: cccsam@ucdavis.UUCP (Sam McCall - Hacker In Residency) Newsgroups: net.bugs,net.news.b Subject: Re: 2.10.3 unbatch bug and fix Message-ID: <250@ucdavis.UUCP> Date: Thu, 20-Mar-86 23:51:31 EST Article-I.D.: ucdavis.250 Posted: Thu Mar 20 23:51:31 1986 Date-Received: Sat, 22-Mar-86 22:07:16 EST References: <243@micropro.UUCP> <9980@ucla-cs.ARPA> Organization: University of California, Davis Lines: 31 Xref: watmath net.bugs:759 net.news.b:1328 >In article <243@micropro.UUCP> news@micropro.UUCP (USENET administrator) writes: > >< while (strncmp(buf, "#! rnews ", 9) > >< || strncmp(buf, "! rnews ", 8)) { /* kludge for bug */ > >--- > >> while (!strncmp(buf, "#! rnews ", 9) > >> && !strncmp(buf, "! rnews ", 8)) { /* kludge for bug */ > > Aren't these two the same by De Morgan's law? > -- > Eduardo Krell UCLA Computer Science Department > ekrell@ucla-locus.arpa ..!{sdcrdcf,ihnp4,trwspp,ucbvax}!ucla-cs!ekrell > > You have the right to express your opinions, > but that doesn't mean your opinions are right ! nope. (a or b) != (!a and !b), but !(a or b) == (!a and !b). thus, for the two to have been equal, you would have wanted to see while !(strncmp(buf, "#! rnews ", 9) || strncmp(buf, "! rnews ", 8)) { /* kludge for bug */ as the first example. -- -sam mccall -unix consultant -computer center -university of california, davis -...{lll-crg,ucbvax}!ucdavis!deneb!cccsam -...ucdavis!deneb!cccsam@ucbvax.berkeley.edu