fix for ANSI C
authorKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Mon, 25 Apr 1988 08:12:35 +0000 (00:12 -0800)
committerKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Mon, 25 Apr 1988 08:12:35 +0000 (00:12 -0800)
SCCS-vsn: lib/libc/stdlib/random.c 5.4
SCCS-vsn: usr.bin/file/file.c 4.14

usr/src/lib/libc/stdlib/random.c
usr/src/usr.bin/file/file.c

index a9d84ec..f6ca4ff 100644 (file)
@@ -5,7 +5,7 @@
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)random.c   5.3 (Berkeley) %G%";
+static char sccsid[] = "@(#)random.c   5.4 (Berkeley) %G%";
 #endif LIBC_SCCS and not lint
 
 #include       <stdio.h>
 #endif LIBC_SCCS and not lint
 
 #include       <stdio.h>
@@ -176,6 +176,7 @@ srandom( x )
     unsigned           x;
 {
        register  int           i, j;
     unsigned           x;
 {
        register  int           i, j;
+       long random();
 
        if(  rand_type  ==  TYPE_0  )  {
            state[ 0 ] = x;
 
        if(  rand_type  ==  TYPE_0  )  {
            state[ 0 ] = x;
index f1eeeca..2bf160e 100644 (file)
@@ -1,5 +1,5 @@
 #ifndef lint
 #ifndef lint
-static char sccsid[] = "@(#)file.c     4.13 (Berkeley) %G%";
+static char sccsid[] = "@(#)file.c     4.14 (Berkeley) %G%";
 #endif
 /*
  * file - determine type of file
 #endif
 /*
  * file - determine type of file
@@ -422,7 +422,7 @@ char *bp;
                ct[j]=0;
        for(j=0; j<n; j++)
        {
                ct[j]=0;
        for(j=0; j<n; j++)
        {
-               if (bp[j]<NASC)
+               if ((u_char)bp[j]<NASC)
                        ct[bp[j]|040]++;
                switch (bp[j])
                {
                        ct[bp[j]|040]++;
                switch (bp[j])
                {