BSD 4_4_Lite2 release
[unix-history] / usr / src / usr.bin / locate / bigram / locate.bigram.c
index b58fac4..fc0cbb7 100644 (file)
@@ -41,7 +41,7 @@ static char copyright[] =
 #endif /* not lint */
 
 #ifndef lint
 #endif /* not lint */
 
 #ifndef lint
-static char sccsid[] = "@(#)locate.bigram.c    8.1 (Berkeley) 6/6/93";
+static char sccsid[] = "@(#)locate.bigram.c    8.2 (Berkeley) 4/28/95";
 #endif /* not lint */
 
 /*
 #endif /* not lint */
 
 /*
@@ -66,12 +66,12 @@ main ( )
 
                /* skip longest common prefix */
                for ( cp = path; *cp == *oldpath; cp++, oldpath++ )
 
                /* skip longest common prefix */
                for ( cp = path; *cp == *oldpath; cp++, oldpath++ )
-                       if ( *oldpath == NULL )
+                       if ( *oldpath == '\0' )
                                break;
                /*
                 * output post-residue bigrams only
                 */
                                break;
                /*
                 * output post-residue bigrams only
                 */
-               while ( *cp != NULL && *(cp + 1) != NULL ) {
+               while ( *cp != '\0' && *(cp + 1) != '\0' ) {
                        putchar ( *cp++ );
                        putchar ( *cp++ );
                        putchar ( '\n' );
                        putchar ( *cp++ );
                        putchar ( *cp++ );
                        putchar ( '\n' );
@@ -81,4 +81,5 @@ main ( )
                else
                        path = buf1, oldpath = buf2;
        }
                else
                        path = buf1, oldpath = buf2;
        }
+       return (0);
 }
 }