sneak (somewhat) through lint
authorEric Allman <eric@ucbvax.Berkeley.EDU>
Thu, 6 Nov 1980 02:51:54 +0000 (18:51 -0800)
committerEric Allman <eric@ucbvax.Berkeley.EDU>
Thu, 6 Nov 1980 02:51:54 +0000 (18:51 -0800)
SCCS-vsn: usr.bin/sccs/sccs.c 1.46

usr/src/usr.bin/sccs/sccs.c

index ebf636b..5e2ef67 100644 (file)
@@ -92,7 +92,7 @@
 **             Copyright 1980 Regents of the University of California
 */
 
 **             Copyright 1980 Regents of the University of California
 */
 
-static char SccsId[] = "@(#)sccs.c     1.45 %G%";
+static char SccsId[] = "@(#)sccs.c     1.46 %G%";
 \f
 /*******************  Configuration Information  ********************/
 
 \f
 /*******************  Configuration Information  ********************/
 
@@ -456,7 +456,7 @@ command(argv, forkflag, arg0)
                *np = NULL;
 
                /* get all the files that we unedited successfully */
                *np = NULL;
 
                /* get all the files that we unedited successfully */
-               if (i > 0)
+               if (np > &ap[1])
                        rval = command(&ap[1], FALSE, "get");
                break;
 
                        rval = command(&ap[1], FALSE, "get");
                break;
 
@@ -611,6 +611,7 @@ callprog(progpath, flags, argv, forkflag)
        execv(progpath, argv);
        syserr("cannot execute %s", progpath);
        exit(EX_UNAVAILABLE);
        execv(progpath, argv);
        syserr("cannot execute %s", progpath);
        exit(EX_UNAVAILABLE);
+       /*NOTREACHED*/
 }
 \f
 /*
 }
 \f
 /*
@@ -644,7 +645,6 @@ makefile(name)
        char *name;
 {
        register char *p;
        char *name;
 {
        register char *p;
-       register char c;
        char buf[512];
        extern char *malloc();
        extern char *rindex();
        char buf[512];
        extern char *malloc();
        extern char *rindex();
@@ -786,7 +786,6 @@ clean(mode)
        int mode;
 {
        struct direct dir;
        int mode;
 {
        struct direct dir;
-       struct stat stbuf;
        char buf[100];
        char pline[120];
        register FILE *dirfd;
        char buf[100];
        char pline[120];
        register FILE *dirfd;
@@ -817,7 +816,7 @@ clean(mode)
        */
 
        gotedit = FALSE;
        */
 
        gotedit = FALSE;
-       while (fread(&dir, sizeof dir, 1, dirfd) != NULL)
+       while (fread((char *)&dir, sizeof dir, 1, dirfd) != NULL)
        {
                if (dir.d_ino == 0 || strncmp(dir.d_name, "s.", 2) != 0)
                        continue;
        {
                if (dir.d_ino == 0 || strncmp(dir.d_name, "s.", 2) != 0)
                        continue;
@@ -892,7 +891,6 @@ unedit(fn)
        char *pfn;
        static char tfn[] = "/tmp/sccsXXXXX";
        FILE *tfp;
        char *pfn;
        static char tfn[] = "/tmp/sccsXXXXX";
        FILE *tfp;
-       register char *p;
        register char *q;
        bool delete = FALSE;
        bool others = FALSE;
        register char *q;
        bool delete = FALSE;
        bool others = FALSE;
@@ -1179,6 +1177,7 @@ nextfield(p)
 **             none.
 */
 
 **             none.
 */
 
+/*VARARGS1*/
 usrerr(f, p1, p2, p3)
        char *f;
 {
 usrerr(f, p1, p2, p3)
        char *f;
 {
@@ -1203,6 +1202,7 @@ usrerr(f, p1, p2, p3)
 **             none.
 */
 
 **             none.
 */
 
+/*VARARGS1*/
 syserr(f, p1, p2, p3)
        char *f;
 {
 syserr(f, p1, p2, p3)
        char *f;
 {
@@ -1215,7 +1215,7 @@ syserr(f, p1, p2, p3)
                exit(EX_SOFTWARE);
        else
        {
                exit(EX_SOFTWARE);
        else
        {
-               perror(0);
+               perror(NULL);
                exit(EX_OSERR);
        }
 }
                exit(EX_OSERR);
        }
 }