lint-style cleanup
authorEric Allman <eric@ucbvax.Berkeley.EDU>
Sun, 6 Jun 1993 08:08:17 +0000 (00:08 -0800)
committerEric Allman <eric@ucbvax.Berkeley.EDU>
Sun, 6 Jun 1993 08:08:17 +0000 (00:08 -0800)
SCCS-vsn: usr.sbin/sendmail/src/usersmtp.c 6.34
SCCS-vsn: usr.sbin/sendmail/src/main.c 6.70
SCCS-vsn: usr.sbin/sendmail/src/parseaddr.c 6.60
SCCS-vsn: usr.sbin/sendmail/src/domain.c 6.22
SCCS-vsn: usr.sbin/sendmail/src/arpadate.c 6.9
SCCS-vsn: usr.sbin/sendmail/src/srvrsmtp.c 6.60
SCCS-vsn: usr.sbin/sendmail/src/util.c 6.21
SCCS-vsn: usr.sbin/sendmail/src/readcf.c 6.43
SCCS-vsn: usr.sbin/sendmail/src/deliver.c 6.82
SCCS-vsn: usr.sbin/sendmail/src/conf.c 6.63
SCCS-vsn: usr.sbin/sendmail/src/alias.c 6.52
SCCS-vsn: usr.sbin/sendmail/src/map.c 6.28

12 files changed:
usr/src/usr.sbin/sendmail/src/alias.c
usr/src/usr.sbin/sendmail/src/arpadate.c
usr/src/usr.sbin/sendmail/src/conf.c
usr/src/usr.sbin/sendmail/src/deliver.c
usr/src/usr.sbin/sendmail/src/domain.c
usr/src/usr.sbin/sendmail/src/main.c
usr/src/usr.sbin/sendmail/src/map.c
usr/src/usr.sbin/sendmail/src/parseaddr.c
usr/src/usr.sbin/sendmail/src/readcf.c
usr/src/usr.sbin/sendmail/src/srvrsmtp.c
usr/src/usr.sbin/sendmail/src/usersmtp.c
usr/src/usr.sbin/sendmail/src/util.c

index f1055f7..35fd9b8 100644 (file)
@@ -11,7 +11,7 @@
 # include <pwd.h>
 
 #ifndef lint
 # include <pwd.h>
 
 #ifndef lint
-static char sccsid[] = "@(#)alias.c    6.51 (Berkeley) %G%";
+static char sccsid[] = "@(#)alias.c    6.52 (Berkeley) %G%";
 #endif /* not lint */
 
 
 #endif /* not lint */
 
 
@@ -445,7 +445,6 @@ readaliases(map, af, automatic)
        bool skipping;
        long naliases, bytes, longest;
        ADDRESS al, bl;
        bool skipping;
        long naliases, bytes, longest;
        ADDRESS al, bl;
-       register STAB *s;
        char line[BUFSIZ];
 
        /*
        char line[BUFSIZ];
 
        /*
index 5a783ab..2b507aa 100644 (file)
@@ -7,7 +7,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)arpadate.c 6.8 (Berkeley) %G%";
+static char sccsid[] = "@(#)arpadate.c 6.9 (Berkeley) %G%";
 #endif /* not lint */
 
 # include "sendmail.h"
 #endif /* not lint */
 
 # include "sendmail.h"
@@ -145,48 +145,3 @@ arpadate(ud)
 
        return (b);
 }
 
        return (b);
 }
-
-/*
-**  NEXTATOM -- Return pointer to next atom in header
-**             (skip whitespace and comments)
-**
-**     Parameters:
-**             s -- pointer to header string
-**
-**     Returns:
-**             pointer advanced to next non-comment header atom
-**
-**     Side Effects:
-**             none
-*/
-
-static char *
-nextatom(s)
-       char *s;
-{
-       char *p;
-
-       for (p = s;
-            *p && (*p == ' ' || *p == '\t' || *p == '\n' || *p == '(');
-            p++)
-       {
-               if (*p == '(')
-               {
-                       int nested = 0;
-
-                       /* ignore comments */
-                       p++;
-                       for (; *p; p++)
-                       {
-                               if (*p == '(')
-                                       nested++;
-                               else if (*p == ')')
-                                       if (!nested)
-                                               break;
-                                       else
-                                               nested--;
-                       }
-               }
-       }
-       return (p);
-}
index 1c5097e..d8cd42a 100644 (file)
@@ -7,7 +7,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)conf.c     6.62 (Berkeley) %G%";
+static char sccsid[] = "@(#)conf.c     6.63 (Berkeley) %G%";
 #endif /* not lint */
 
 # include <sys/ioctl.h>
 #endif /* not lint */
 
 # include <sys/ioctl.h>
@@ -1162,7 +1162,6 @@ enoughspace(msize)
 #   define FSBLOCKSIZE fs.f_bsize
 #  endif
 # endif
 #   define FSBLOCKSIZE fs.f_bsize
 #  endif
 # endif
-       long blocksneeded;
        extern int errno;
 
        if (MinBlocksFree <= 0 && msize <= 0)
        extern int errno;
 
        if (MinBlocksFree <= 0 && msize <= 0)
index b3d0f82..1b7a232 100644 (file)
@@ -7,7 +7,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)deliver.c  6.81 (Berkeley) %G%";
+static char sccsid[] = "@(#)deliver.c  6.82 (Berkeley) %G%";
 #endif /* not lint */
 
 #include "sendmail.h"
 #endif /* not lint */
 
 #include "sendmail.h"
@@ -1703,7 +1703,6 @@ logdelivery(m, mci, stat, e)
        register ENVELOPE *e;
 {
 # ifdef LOG
        register ENVELOPE *e;
 {
 # ifdef LOG
-       char *curhost;
        char buf[512];
 
        (void) sprintf(buf, "delay=%s", pintvl(curtime() - e->e_ctime, TRUE));
        char buf[512];
 
        (void) sprintf(buf, "delay=%s", pintvl(curtime() - e->e_ctime, TRUE));
index 54c9e28..39936dd 100644 (file)
@@ -10,9 +10,9 @@
 
 #ifndef lint
 #ifdef NAMED_BIND
 
 #ifndef lint
 #ifdef NAMED_BIND
-static char sccsid[] = "@(#)domain.c   6.21 (Berkeley) %G% (with name server)";
+static char sccsid[] = "@(#)domain.c   6.22 (Berkeley) %G% (with name server)";
 #else
 #else
-static char sccsid[] = "@(#)domain.c   6.21 (Berkeley) %G% (without name server)";
+static char sccsid[] = "@(#)domain.c   6.22 (Berkeley) %G% (without name server)";
 #endif
 #endif /* not lint */
 
 #endif
 #endif /* not lint */
 
@@ -337,7 +337,7 @@ getcanonname(host, hbsize)
        register int n; 
        HEADER *hp;
        querybuf answer;
        register int n; 
        HEADER *hp;
        querybuf answer;
-       int first, ancount, qdcount;
+       int ancount, qdcount;
        int ret;
        char **domain;
        int type;
        int ret;
        char **domain;
        int type;
index f8c8468..64784e2 100644 (file)
@@ -13,7 +13,7 @@ char copyright[] =
 #endif /* not lint */
 
 #ifndef lint
 #endif /* not lint */
 
 #ifndef lint
-static char sccsid[] = "@(#)main.c     6.69 (Berkeley) %G%";
+static char sccsid[] = "@(#)main.c     6.70 (Berkeley) %G%";
 #endif /* not lint */
 
 #define        _DEFINE
 #endif /* not lint */
 
 #define        _DEFINE
@@ -1410,7 +1410,7 @@ obsolete(argv)
 {
        char *ap;
 
 {
        char *ap;
 
-       while (ap = *++argv)
+       while ((ap = *++argv) != NULL)
        {
                /* Return if "--" or not an option of any form. */
                if (ap[0] != '-' || ap[1] == '-')
        {
                /* Return if "--" or not an option of any form. */
                if (ap[0] != '-' || ap[1] == '-')
index f893d67..81d4784 100644 (file)
@@ -7,7 +7,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)map.c      6.27 (Berkeley) %G%";
+static char sccsid[] = "@(#)map.c      6.28 (Berkeley) %G%";
 #endif /* not lint */
 
 #include "sendmail.h"
 #endif /* not lint */
 
 #include "sendmail.h"
@@ -894,9 +894,11 @@ nis_map_close(map)
 */
 
 char *
 */
 
 char *
-stab_map_lookup(map, name)
+stab_map_lookup(map, name, av, pstat)
        register MAP *map;
        char *name;
        register MAP *map;
        char *name;
+       char **av;
+       int *pstat;
 {
        register STAB *s;
 
 {
        register STAB *s;
 
@@ -941,8 +943,6 @@ stab_map_open(map, mode)
        register MAP *map;
        int mode;
 {
        register MAP *map;
        int mode;
 {
-       FILE *af;
-
        if (tTd(38, 2))
                printf("stab_map_open(%s)\n", map->map_file);
 
        if (tTd(38, 2))
                printf("stab_map_open(%s)\n", map->map_file);
 
index c43e8e1..5b26aca 100644 (file)
@@ -7,7 +7,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)parseaddr.c        6.59 (Berkeley) %G%";
+static char sccsid[] = "@(#)parseaddr.c        6.60 (Berkeley) %G%";
 #endif /* not lint */
 
 #include "sendmail.h"
 #endif /* not lint */
 
 #include "sendmail.h"
@@ -238,8 +238,6 @@ allocaddr(a, copyf, paddr, delimptr)
        char *paddr;
        char *delimptr;
 {
        char *paddr;
        char *delimptr;
 {
-       register MAILER *m = a->q_mailer;
-
        if (tTd(24, 4))
                printf("allocaddr(copyf=%d, paddr=%s)\n", copyf, paddr);
 
        if (tTd(24, 4))
                printf("allocaddr(copyf=%d, paddr=%s)\n", copyf, paddr);
 
@@ -1276,7 +1274,6 @@ backup:
                        char **hbrvp, **ubrvp;
                        char **xpvp;
                        int trsize;
                        char **hbrvp, **ubrvp;
                        char **xpvp;
                        int trsize;
-                       char *olddelimchar;
                        char *replac;
                        int endtoken;
                        STAB *map;
                        char *replac;
                        int endtoken;
                        STAB *map;
index cc82e54..986637c 100644 (file)
@@ -7,7 +7,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)readcf.c   6.42 (Berkeley) %G%";
+static char sccsid[] = "@(#)readcf.c   6.43 (Berkeley) %G%";
 #endif /* not lint */
 
 # include "sendmail.h"
 #endif /* not lint */
 
 # include "sendmail.h"
@@ -68,7 +68,6 @@ readcf(cfname)
        FILE *cf;
        int ruleset = 0;
        char *q;
        FILE *cf;
        int ruleset = 0;
        char *q;
-       char **pv;
        struct rewrite *rwp = NULL;
        char *bp;
        int nfuzzy;
        struct rewrite *rwp = NULL;
        char *bp;
        int nfuzzy;
index af51a58..b9faf4f 100644 (file)
@@ -10,9 +10,9 @@
 
 #ifndef lint
 #ifdef SMTP
 
 #ifndef lint
 #ifdef SMTP
-static char sccsid[] = "@(#)srvrsmtp.c 6.59 (Berkeley) %G% (with SMTP)";
+static char sccsid[] = "@(#)srvrsmtp.c 6.60 (Berkeley) %G% (with SMTP)";
 #else
 #else
-static char sccsid[] = "@(#)srvrsmtp.c 6.59 (Berkeley) %G% (without SMTP)";
+static char sccsid[] = "@(#)srvrsmtp.c 6.60 (Berkeley) %G% (without SMTP)";
 #endif
 #endif /* not lint */
 
 #endif
 #endif /* not lint */
 
index 1d15c5b..e96b8c0 100644 (file)
@@ -10,9 +10,9 @@
 
 #ifndef lint
 #ifdef SMTP
 
 #ifndef lint
 #ifdef SMTP
-static char sccsid[] = "@(#)usersmtp.c 6.33 (Berkeley) %G% (with SMTP)";
+static char sccsid[] = "@(#)usersmtp.c 6.34 (Berkeley) %G% (with SMTP)";
 #else
 #else
-static char sccsid[] = "@(#)usersmtp.c 6.33 (Berkeley) %G% (without SMTP)";
+static char sccsid[] = "@(#)usersmtp.c 6.34 (Berkeley) %G% (without SMTP)";
 #endif
 #endif /* not lint */
 
 #endif
 #endif /* not lint */
 
@@ -160,7 +160,7 @@ tryhelo:
 
        p = strchr(&SmtpReplyBuffer[4], ' ');
        if (p != NULL)
 
        p = strchr(&SmtpReplyBuffer[4], ' ');
        if (p != NULL)
-               *p == '\0';
+               *p = '\0';
        if (strcasecmp(&SmtpReplyBuffer[4], MyHostName) == 0)
        {
                syserr("553 %s config error: mail loops back to myself",
        if (strcasecmp(&SmtpReplyBuffer[4], MyHostName) == 0)
        {
                syserr("553 %s config error: mail loops back to myself",
index f15b7df..7789e81 100644 (file)
@@ -7,7 +7,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)util.c     6.20 (Berkeley) %G%";
+static char sccsid[] = "@(#)util.c     6.21 (Berkeley) %G%";
 #endif /* not lint */
 
 # include "sendmail.h"
 #endif /* not lint */
 
 # include "sendmail.h"
@@ -469,7 +469,6 @@ dfopen(filename, omode, cmode)
        int cmode;
 {
        register int tries;
        int cmode;
 {
        register int tries;
-       FILE *fp;
        int fd;
        register struct omodes *om;
        struct stat st;
        int fd;
        register struct omodes *om;
        struct stat st;
@@ -531,8 +530,8 @@ putline(l, fp, m)
        /* strip out 0200 bits -- these can look like TELNET protocol */
        if (bitnset(M_7BITS, m->m_flags))
        {
        /* strip out 0200 bits -- these can look like TELNET protocol */
        if (bitnset(M_7BITS, m->m_flags))
        {
-               for (p = l; svchar = *p; ++p)
-                       if (svchar & 0200)
+               for (p = l; (svchar = *p) != '\0'; ++p)
+                       if (bitset(0200, svchar))
                                *p = svchar &~ 0200;
        }
 
                                *p = svchar &~ 0200;
        }