diff options
author | wosch <wosch@FreeBSD.org> | 1996-08-31 14:51:18 +0000 |
---|---|---|
committer | wosch <wosch@FreeBSD.org> | 1996-08-31 14:51:18 +0000 |
commit | daaa458ad4e4d56643147824f01dc948bdfae9e4 (patch) | |
tree | e38a39ca1b59aadf68667083014042ec3ec47203 /usr.bin/locate/bigram/locate.bigram.c | |
parent | 7d4c1814f6c8b48aaba422848781244a3a8e1685 (diff) | |
download | FreeBSD-src-daaa458ad4e4d56643147824f01dc948bdfae9e4.zip FreeBSD-src-daaa458ad4e4d56643147824f01dc948bdfae9e4.tar.gz |
NULL -> '\0'
Submitted by: Bruce, see also c-faq 5.6 and 5.9
Diffstat (limited to 'usr.bin/locate/bigram/locate.bigram.c')
-rw-r--r-- | usr.bin/locate/bigram/locate.bigram.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/locate/bigram/locate.bigram.c b/usr.bin/locate/bigram/locate.bigram.c index 922d00e..2103f6b 100644 --- a/usr.bin/locate/bigram/locate.bigram.c +++ b/usr.bin/locate/bigram/locate.bigram.c @@ -33,7 +33,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: locate.bigram.c,v 1.4 1996/08/22 18:46:11 wosch Exp $ + * $Id: locate.bigram.c,v 1.5 1996/08/30 03:06:15 peter Exp $ */ #ifndef lint @@ -76,19 +76,19 @@ main(void) continue; /* Squelch characters that would botch the decoding. */ - for (cp = path; *cp != NULL; cp++) { + for (cp = path; *cp != '\0'; cp++) { /* chop newline */ if (*cp == '\n') - *cp = NULL; + *cp = '\0'; /* range */ else if (*cp < ASCII_MIN || *cp > ASCII_MAX) *cp = '?'; } /* skip longest common prefix */ - for (cp = path; *cp == *oldpath && *cp != NULL; cp++, oldpath++); + for (cp = path; *cp == *oldpath && *cp != '\0'; cp++, oldpath++); - while (*cp != NULL && *(cp+1) != NULL) { + while (*cp != '\0' && *(cp+1) != '\0') { bigram[*cp][*(cp+1)]++; cp += 2; } |