*BSD News Article 45424


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.uwa.edu.au!classic.iinet.com.au!bighorn.accessnv.com!news.sprintlink.net!EU.net!i2unix!pianosa.to.sem.it!pianosa.to.sem.it!not-for-mail
From: paolo@to.sem.it (Paolo Zeppegno)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: Major strcmp bug under BSD 2.0?
Date: 10 Jun 1995 12:18:08 +0200
Organization: Systems & Management S.p.A.
Lines: 11
Message-ID: <3rbrh0$f62@pianosa.to.sem.it>
References: <id.CQCK1.FCH@nmti.com> <3qj0ll$h3l@engnews2.eng.sun.com> <id.FUDK1.J4J@nmti.com>
NNTP-Posting-Host: pianosa.to.sem.it


Sorry, but I remember seeing (null) printed for a printf("%s", 0) about
12 years ago on a pdp11/34 running V6 (or maybe at that time it had been
upgraded to either V7 or BSD 2.7?), anyway at that time I found it very 
nice of them to let me know my code had a problem (besides (null) may
actually be the right answer for printf("%s", 0)...

I don't think that checking for NULL in the str* routines is the right
approach though.

	paolo zeppegno