cleanup to make gcc -Winitialized happier
authorEric Allman <eric@ucbvax.Berkeley.EDU>
Fri, 24 Feb 1995 08:07:27 +0000 (00:07 -0800)
committerEric Allman <eric@ucbvax.Berkeley.EDU>
Fri, 24 Feb 1995 08:07:27 +0000 (00:07 -0800)
SCCS-vsn: usr.sbin/sendmail/src/map.c 8.44
SCCS-vsn: usr.sbin/sendmail/src/alias.c 8.36
SCCS-vsn: usr.sbin/sendmail/src/conf.c 8.132
SCCS-vsn: usr.sbin/sendmail/src/queue.c 8.63
SCCS-vsn: usr.sbin/sendmail/src/deliver.c 8.124
SCCS-vsn: usr.sbin/sendmail/src/util.c 8.50
SCCS-vsn: usr.sbin/sendmail/src/clock.c 8.10
SCCS-vsn: usr.sbin/sendmail/src/srvrsmtp.c 8.55
SCCS-vsn: usr.sbin/sendmail/src/daemon.c 8.69
SCCS-vsn: usr.sbin/sendmail/src/sendmail.h 8.89
SCCS-vsn: usr.sbin/sendmail/src/collect.c 8.27
SCCS-vsn: usr.sbin/sendmail/src/parseaddr.c 8.54
SCCS-vsn: usr.sbin/sendmail/src/main.c 8.84
SCCS-vsn: usr.sbin/sendmail/src/recipient.c 8.67
SCCS-vsn: usr.sbin/sendmail/src/usersmtp.c 8.36
SCCS-vsn: usr.sbin/sendmail/src/domain.c 8.31

16 files changed:
usr/src/usr.sbin/sendmail/src/alias.c
usr/src/usr.sbin/sendmail/src/clock.c
usr/src/usr.sbin/sendmail/src/collect.c
usr/src/usr.sbin/sendmail/src/conf.c
usr/src/usr.sbin/sendmail/src/daemon.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/queue.c
usr/src/usr.sbin/sendmail/src/recipient.c
usr/src/usr.sbin/sendmail/src/sendmail.h
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 ddfa7ea..52d508d 100644 (file)
@@ -10,7 +10,7 @@
 # include <pwd.h>
 
 #ifndef lint
 # include <pwd.h>
 
 #ifndef lint
-static char sccsid[] = "@(#)alias.c    8.35 (Berkeley) %G%";
+static char sccsid[] = "@(#)alias.c    8.36 (Berkeley) %G%";
 #endif /* not lint */
 
 
 #endif /* not lint */
 
 
@@ -41,6 +41,7 @@ int   NAliasDBs;                      /* number of alias databases */
 **                     nothing.
 */
 
 **                     nothing.
 */
 
+void
 alias(a, sendq, aliaslevel, e)
        register ADDRESS *a;
        ADDRESS **sendq;
 alias(a, sendq, aliaslevel, e)
        register ADDRESS *a;
        ADDRESS **sendq;
@@ -184,6 +185,7 @@ aliaslookup(name, e)
 **             none.
 */
 
 **             none.
 */
 
+void
 setalias(spec)
        char *spec;
 {
 setalias(spec)
        char *spec;
 {
@@ -413,6 +415,7 @@ aliaswait(map, ext, isopen)
 **             DBM or DB version.
 */
 
 **             DBM or DB version.
 */
 
+void
 rebuildaliases(map, automatic)
        register MAP *map;
        bool automatic;
 rebuildaliases(map, automatic)
        register MAP *map;
        bool automatic;
@@ -533,6 +536,7 @@ rebuildaliases(map, automatic)
 **             Optionally, builds the .dir & .pag files.
 */
 
 **             Optionally, builds the .dir & .pag files.
 */
 
+void
 readaliases(map, af, announcestats, logstats)
        register MAP *map;
        FILE *af;
 readaliases(map, af, announcestats, logstats)
        register MAP *map;
        FILE *af;
@@ -766,6 +770,7 @@ readaliases(map, af, announcestats, logstats)
 **             New names are added to send queues.
 */
 
 **             New names are added to send queues.
 */
 
+void
 forward(user, sendq, aliaslevel, e)
        ADDRESS *user;
        ADDRESS **sendq;
 forward(user, sendq, aliaslevel, e)
        ADDRESS *user;
        ADDRESS **sendq;
@@ -798,6 +803,7 @@ forward(user, sendq, aliaslevel, e)
        {
                int err;
                char buf[MAXPATHLEN+1];
        {
                int err;
                char buf[MAXPATHLEN+1];
+               extern int include();
 
                ep = strchr(pp, ':');
                if (ep != NULL)
 
                ep = strchr(pp, ':');
                if (ep != NULL)
index cbf6193..f562fce 100644 (file)
@@ -7,7 +7,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)clock.c    8.9 (Berkeley) %G%";
+static char sccsid[] = "@(#)clock.c    8.10 (Berkeley) %G%";
 #endif /* not lint */
 
 # include "sendmail.h"
 #endif /* not lint */
 
 # include "sendmail.h"
@@ -39,7 +39,7 @@ static void tick __P((int));
 EVENT *
 setevent(intvl, func, arg)
        time_t intvl;
 EVENT *
 setevent(intvl, func, arg)
        time_t intvl;
-       int (*func)();
+       void (*func)();
        int arg;
 {
        register EVENT **evp;
        int arg;
 {
        register EVENT **evp;
@@ -91,6 +91,7 @@ setevent(intvl, func, arg)
 **             arranges for event ev to not happen.
 */
 
 **             arranges for event ev to not happen.
 */
 
+void
 clrevent(ev)
        register EVENT *ev;
 {
 clrevent(ev)
        register EVENT *ev;
 {
@@ -156,7 +157,7 @@ tick(arg)
        while ((ev = EventQueue) != NULL &&
               (ev->ev_time <= now || ev->ev_pid != mypid))
        {
        while ((ev = EventQueue) != NULL &&
               (ev->ev_time <= now || ev->ev_pid != mypid))
        {
-               int (*f)();
+               void (*f)();
                int arg;
                int pid;
 
                int arg;
                int pid;
 
@@ -225,7 +226,7 @@ tick(arg)
 */
 
 static bool    SleepDone;
 */
 
 static bool    SleepDone;
-static int     endsleep();
+static void    endsleep();
 
 #ifndef SLEEP_T
 # define SLEEP_T       unsigned int
 
 #ifndef SLEEP_T
 # define SLEEP_T       unsigned int
@@ -243,7 +244,7 @@ sleep(intvl)
                pause();
 }
 
                pause();
 }
 
-static
+static void
 endsleep()
 {
        SleepDone = TRUE;
 endsleep()
 {
        SleepDone = TRUE;
index 77b0ebb..1a0c934 100644 (file)
@@ -7,7 +7,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)collect.c  8.26 (Berkeley) %G%";
+static char sccsid[] = "@(#)collect.c  8.27 (Berkeley) %G%";
 #endif /* not lint */
 
 # include <errno.h>
 #endif /* not lint */
 
 # include <errno.h>
@@ -40,7 +40,7 @@ char  *CollectErrorMessage;
 bool   CollectErrno;
 
 static jmp_buf CtxCollectTimeout;
 bool   CollectErrno;
 
 static jmp_buf CtxCollectTimeout;
-static int     collecttimeout();
+static void    collecttimeout();
 static bool    CollectProgress;
 static EVENT   *CollectTimeout;
 
 static bool    CollectProgress;
 static EVENT   *CollectTimeout;
 
@@ -57,6 +57,7 @@ static EVENT  *CollectTimeout;
 #define MS_BODY                2       /* reading message body */
 
 
 #define MS_BODY                2       /* reading message body */
 
 
+void
 maketemp(from)
        char *from;
 {
 maketemp(from)
        char *from;
 {
@@ -64,7 +65,7 @@ maketemp(from)
        bool ignrdot = smtpmode ? FALSE : IgnrDot;
        time_t dbto = smtpmode ? TimeOuts.to_datablock : 0;
        register char *bp;
        bool ignrdot = smtpmode ? FALSE : IgnrDot;
        time_t dbto = smtpmode ? TimeOuts.to_datablock : 0;
        register char *bp;
-       register int c;
+       int c = '\0';
        bool inputerr = FALSE;
        bool headeronly = FALSE;
        char *buf;
        bool inputerr = FALSE;
        bool headeronly = FALSE;
        char *buf;
@@ -75,6 +76,8 @@ maketemp(from)
        char peekbuf[8];
        char bufbuf[MAXLINE];
        extern bool isheader();
        char peekbuf[8];
        char bufbuf[MAXLINE];
        extern bool isheader();
+       extern void eatheader();
+       extern void tferror();
        extern char *index();
 
        CollectErrorMessage = NULL;
        extern char *index();
 
        CollectErrorMessage = NULL;
@@ -300,10 +303,14 @@ nextstate:
                                istate, mstate, buf);
                switch (mstate)
                {
                                istate, mstate, buf);
                switch (mstate)
                {
+                       extern int chompheader();
+
                  case MS_UFROM:
                        mstate = MS_HEADER;
                        if (strncmp(buf, "From ", 5) == 0)
                        {
                  case MS_UFROM:
                        mstate = MS_HEADER;
                        if (strncmp(buf, "From ", 5) == 0)
                        {
+                               extern void eatfrom();
+
                                bp = buf;
                                eatfrom(buf, e);
                                continue;
                                bp = buf;
                                eatfrom(buf, e);
                                continue;
@@ -452,7 +459,11 @@ readerr:
 
        /* collect statistics */
        if (OpMode != MD_VERIFY)
 
        /* collect statistics */
        if (OpMode != MD_VERIFY)
+       {
+               extern void markstats();
+
                markstats(e, (ADDRESS *) NULL);
                markstats(e, (ADDRESS *) NULL);
+       }
 
        /*
        **  Add an Apparently-To: line if we have no recipient lines.
 
        /*
        **  Add an Apparently-To: line if we have no recipient lines.
@@ -469,6 +480,8 @@ readerr:
                /*    that or reject the message.... */
                for (q = e->e_sendqueue; q != NULL; q = q->q_next)
                {
                /*    that or reject the message.... */
                for (q = e->e_sendqueue; q != NULL; q = q->q_next)
                {
+                       extern void addheader();
+
                        if (q->q_alias != NULL)
                                continue;
                        if (tTd(30, 3))
                        if (q->q_alias != NULL)
                                continue;
                        if (tTd(30, 3))
@@ -501,7 +514,7 @@ readerr:
 }
 
 
 }
 
 
-static
+static void
 collecttimeout(timeout)
        time_t timeout;
 {
 collecttimeout(timeout)
        time_t timeout;
 {
@@ -527,6 +540,7 @@ collecttimeout(timeout)
 **             Arranges for following output to go elsewhere.
 */
 
 **             Arranges for following output to go elsewhere.
 */
 
+void
 tferror(tf, e)
        FILE *tf;
        register ENVELOPE *e;
 tferror(tf, e)
        FILE *tf;
        register ENVELOPE *e;
@@ -601,6 +615,7 @@ char        *MonthList[] =
        NULL
 };
 
        NULL
 };
 
+void
 eatfrom(fm, e)
        char *fm;
        register ENVELOPE *e;
 eatfrom(fm, e)
        char *fm;
        register ENVELOPE *e;
index 6b1b450..7982593 100644 (file)
@@ -7,7 +7,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)conf.c     8.131 (Berkeley) %G%";
+static char sccsid[] = "@(#)conf.c     8.132 (Berkeley) %G%";
 #endif /* not lint */
 
 # include "sendmail.h"
 #endif /* not lint */
 
 # include "sendmail.h"
@@ -154,10 +154,15 @@ int       DtableSize =    50;             /* max open files; reset in 4.2bsd */
 
 #define DAYS           * 24 * 60 * 60
 
 
 #define DAYS           * 24 * 60 * 60
 
+void
 setdefaults(e)
        register ENVELOPE *e;
 {
        int i;
 setdefaults(e)
        register ENVELOPE *e;
 {
        int i;
+       extern void inittimeouts();
+       extern void setdefuser();
+       extern void setupmaps();
+       extern void setupmailers();
 
        SpaceSub = ' ';                         /* option B */
        QueueLA = 8;                            /* option x */
 
        SpaceSub = ' ';                         /* option B */
        QueueLA = 8;                            /* option x */
@@ -197,6 +202,7 @@ setdefaults(e)
 **  SETDEFUSER -- set/reset DefUser using DefUid (for initgroups())
 */
 
 **  SETDEFUSER -- set/reset DefUser using DefUid (for initgroups())
 */
 
+void
 setdefuser()
 {
        struct passwd *defpwent;
 setdefuser()
 {
        struct passwd *defpwent;
@@ -246,9 +252,11 @@ host_map_init(map, args)
 **  SETUPMAILERS -- initialize default mailers
 */
 
 **  SETUPMAILERS -- initialize default mailers
 */
 
+void
 setupmailers()
 {
        char buf[100];
 setupmailers()
 {
        char buf[100];
+       extern void makemailer();
 
        strcpy(buf, "prog, P=/bin/sh, F=lsoD, A=sh -c $u");
        makemailer(buf);
 
        strcpy(buf, "prog, P=/bin/sh, F=lsoD, A=sh -c $u");
        makemailer(buf);
@@ -281,6 +289,7 @@ setupmailers()
                s->s_mapclass.map_store = store; \
        }
 
                s->s_mapclass.map_store = store; \
        }
 
+void
 setupmaps()
 {
        register STAB *s;
 setupmaps()
 {
        register STAB *s;
@@ -860,6 +869,7 @@ ttypath()
 **             none (unless you include the usrerr stuff)
 */
 
 **             none (unless you include the usrerr stuff)
 */
 
+int
 checkcompat(to, e)
        register ADDRESS *to;
        register ENVELOPE *e;
 checkcompat(to, e)
        register ADDRESS *to;
        register ENVELOPE *e;
@@ -927,6 +937,7 @@ setsignal(sig, handler)
 **             Arranges that signals are held.
 */
 
 **             Arranges that signals are held.
 */
 
+void
 holdsigs()
 {
 }
 holdsigs()
 {
 }
@@ -945,6 +956,7 @@ holdsigs()
 **             Arranges that signals are released.
 */
 
 **             Arranges that signals are released.
 */
 
+void
 rlsesigs()
 {
 }
 rlsesigs()
 {
 }
@@ -959,6 +971,7 @@ rlsesigs()
 # include      <compat.h>
 #endif
 
 # include      <compat.h>
 #endif
 
+void
 init_md(argc, argv)
        int argc;
        char **argv;
 init_md(argc, argv)
        int argc;
        char **argv;
@@ -1473,6 +1486,7 @@ refuseconnections()
 char   ProcTitleBuf[MAXLINE];
 
 /*VARARGS1*/
 char   ProcTitleBuf[MAXLINE];
 
 /*VARARGS1*/
+void
 # ifdef __STDC__
 setproctitle(char *fmt, ...)
 # else
 # ifdef __STDC__
 setproctitle(char *fmt, ...)
 # else
@@ -2111,7 +2125,6 @@ freespace(dir, bsize)
 #   endif
 #  endif
 # endif
 #   endif
 #  endif
 # endif
-       extern int errno;
 
 # if SFS_TYPE == SFS_USTAT
        if (stat(dir, &statbuf) == 0 && ustat(statbuf.st_dev, &fs) == 0)
 
 # if SFS_TYPE == SFS_USTAT
        if (stat(dir, &statbuf) == 0 && ustat(statbuf.st_dev, &fs) == 0)
@@ -2503,6 +2516,7 @@ chownsafe(fd)
 # include <sys/resource.h>
 #endif
 
 # include <sys/resource.h>
 #endif
 
+void
 resetlimits()
 {
 #if HASSETRLIMIT
 resetlimits()
 {
 #if HASSETRLIMIT
index 86204a3..2baecba 100644 (file)
@@ -12,9 +12,9 @@
 
 #ifndef lint
 #ifdef DAEMON
 
 #ifndef lint
 #ifdef DAEMON
-static char sccsid[] = "@(#)daemon.c   8.48.1.2 (Berkeley) %G% (with daemon mode)";
+static char sccsid[] = "@(#)daemon.c   8.69 (Berkeley) %G% (with daemon mode)";
 #else
 #else
-static char sccsid[] = "@(#)daemon.c   8.48.1.2 (Berkeley) %G% (without daemon mode)";
+static char sccsid[] = "@(#)daemon.c   8.69 (Berkeley) %G% (without daemon mode)";
 #endif
 #endif /* not lint */
 
 #endif
 #endif /* not lint */
 
@@ -82,6 +82,7 @@ int           ListenQueueSize = 10;           /* size of listen queue */
 int            TcpRcvBufferSize = 0;           /* size of TCP receive buffer */
 int            TcpSndBufferSize = 0;           /* size of TCP send buffer */
 
 int            TcpRcvBufferSize = 0;           /* size of TCP receive buffer */
 int            TcpSndBufferSize = 0;           /* size of TCP send buffer */
 
+void
 getrequests()
 {
        int t;
 getrequests()
 {
        int t;
@@ -191,7 +192,8 @@ makeconnection(host, port, mci, usesecureport)
        register MCI *mci;
        bool usesecureport;
 {
        register MCI *mci;
        bool usesecureport;
 {
-       register int i, s;
+       register int i = 0;
+       register int s;
        register struct hostent *hp = (struct hostent *)NULL;
        SOCKADDR addr;
        int sav_errno;
        register struct hostent *hp = (struct hostent *)NULL;
        SOCKADDR addr;
        int sav_errno;
@@ -429,7 +431,7 @@ gothostent:
                /* couldn't connect.... figure out why */
                sav_errno = errno;
                (void) close(s);
                /* couldn't connect.... figure out why */
                sav_errno = errno;
                (void) close(s);
-               if (hp && hp->h_addr_list[i])
+               if (hp != NULL && hp->h_addr_list[i])
                {
                        if (tTd(16, 1))
                                printf("Connect failed (%s); trying new address....\n",
                {
                        if (tTd(16, 1))
                                printf("Connect failed (%s); trying new address....\n",
@@ -528,8 +530,6 @@ myhostname(hostbuf, size)
            !getcanonname(hostbuf, size, TRUE) &&
            h_errno == TRY_AGAIN)
        {
            !getcanonname(hostbuf, size, TRUE) &&
            h_errno == TRY_AGAIN)
        {
-               struct stat stbuf;
-
                /* try twice in case name server not yet started up */
                message("My unqualifed host name (%s) unknown to DNS; sleeping for retry",
                        hostbuf);
                /* try twice in case name server not yet started up */
                message("My unqualifed host name (%s) unknown to DNS; sleeping for retry",
                        hostbuf);
@@ -554,7 +554,7 @@ myhostname(hostbuf, size)
 
 static jmp_buf CtxAuthTimeout;
 
 
 static jmp_buf CtxAuthTimeout;
 
-static
+static void
 authtimeout()
 {
        longjmp(CtxAuthTimeout, 1);
 authtimeout()
 {
        longjmp(CtxAuthTimeout, 1);
@@ -758,7 +758,6 @@ host_map_lookup(map, name, av, statp)
        register struct hostent *hp;
        struct in_addr in_addr;
        char *cp;
        register struct hostent *hp;
        struct in_addr in_addr;
        char *cp;
-       int i;
        register STAB *s;
        char hbuf[MAXNAME];
        extern struct hostent *gethostbyaddr();
        register STAB *s;
        char hbuf[MAXNAME];
        extern struct hostent *gethostbyaddr();
index f3d8f0e..a99fe2a 100644 (file)
@@ -7,7 +7,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)deliver.c  8.123 (Berkeley) %G%";
+static char sccsid[] = "@(#)deliver.c  8.124 (Berkeley) %G%";
 #endif /* not lint */
 
 #include "sendmail.h"
 #endif /* not lint */
 
 #include "sendmail.h"
@@ -39,6 +39,7 @@ extern char   SmtpError[];
 **                     appropriate action.
 */
 
 **                     appropriate action.
 */
 
+void
 sendall(e, mode)
        ENVELOPE *e;
        char mode;
 sendall(e, mode)
        ENVELOPE *e;
        char mode;
@@ -49,7 +50,7 @@ sendall(e, mode)
        bool announcequeueup;
        bool oldverbose = Verbose;
        int pid;
        bool announcequeueup;
        bool oldverbose = Verbose;
        int pid;
-       char *qid;
+       extern void sendenvelope();
        int pid;
 #ifdef LOCKF
        struct flock lfd;
        int pid;
 #ifdef LOCKF
        struct flock lfd;
@@ -437,12 +438,12 @@ sendall(e, mode)
        Verbose = oldverbose;
 }
 
        Verbose = oldverbose;
 }
 
+void
 sendenvelope(e, mode)
        register ENVELOPE *e;
        char mode;
 {
        register ADDRESS *q;
 sendenvelope(e, mode)
        register ENVELOPE *e;
        char mode;
 {
        register ADDRESS *q;
-       char *qf;
        bool didany;
 
        /*
        bool didany;
 
        /*
@@ -583,7 +584,7 @@ sendenvelope(e, mode)
 
 dofork()
 {
 
 dofork()
 {
-       register int pid;
+       register int pid = -1;
 
        DOFORK(fork);
        return (pid);
 
        DOFORK(fork);
        return (pid);
@@ -610,6 +611,7 @@ dofork()
 **             The standard input is passed off to someone.
 */
 
 **             The standard input is passed off to someone.
 */
 
+int
 deliver(e, firstto)
        register ENVELOPE *e;
        ADDRESS *firstto;
 deliver(e, firstto)
        register ENVELOPE *e;
        ADDRESS *firstto;
@@ -624,10 +626,10 @@ deliver(e, firstto)
        register MCI *mci;
        register ADDRESS *to = firstto;
        bool clever = FALSE;            /* running user smtp to this mailer */
        register MCI *mci;
        register ADDRESS *to = firstto;
        bool clever = FALSE;            /* running user smtp to this mailer */
-       ADDRESS *tochain = NULL;        /* chain of users in this mailer call */
+       ADDRESS *tochain = NULL;        /* users chain in this mailer call */
        int rcode;                      /* response code */
        char *firstsig;                 /* signature of firstto */
        int rcode;                      /* response code */
        char *firstsig;                 /* signature of firstto */
-       int pid;
+       int pid = -1;
        char *curhost;
        time_t xstart;
        int mpvect[2];
        char *curhost;
        time_t xstart;
        int mpvect[2];
@@ -1047,7 +1049,7 @@ deliver(e, firstto)
        {
 #ifdef DAEMON
                register int i;
        {
 #ifdef DAEMON
                register int i;
-               register u_short port;
+               register u_short port = 0;
 
                if (pv[0] == NULL || pv[1] == NULL || pv[1][0] == '\0')
                {
 
                if (pv[0] == NULL || pv[1] == NULL || pv[1][0] == '\0')
                {
@@ -1074,8 +1076,6 @@ deliver(e, firstto)
                }
                if (pv[2] != NULL)
                        port = atoi(pv[2]);
                }
                if (pv[2] != NULL)
                        port = atoi(pv[2]);
-               else
-                       port = 0;
 tryhost:
                while (*curhost != '\0')
                {
 tryhost:
                while (*curhost != '\0')
                {
@@ -2298,7 +2298,7 @@ putbody(mci, e, separator)
                register int c;
                int padc;
                char *buflim;
                register int c;
                int padc;
                char *buflim;
-               int pos;
+               int pos = 0;
                char peekbuf[10];
 
                /* we can pass it through unmodified */
                char peekbuf[10];
 
                /* we can pass it through unmodified */
@@ -2507,7 +2507,7 @@ mailfile(filename, ctladdr, e)
        register ENVELOPE *e;
 {
        register FILE *f;
        register ENVELOPE *e;
 {
        register FILE *f;
-       register int pid;
+       register int pid = -1;
        int mode;
 
        if (tTd(11, 1))
        int mode;
 
        if (tTd(11, 1))
@@ -2669,7 +2669,7 @@ hostsignature(m, host, e)
        auto int rcode;
        char *hp;
        char *endp;
        auto int rcode;
        char *hp;
        char *endp;
-       int oldoptions;
+       int oldoptions = _res.options;
        char *mxhosts[MAXMXHOSTS + 1];
 #endif
 
        char *mxhosts[MAXMXHOSTS + 1];
 #endif
 
@@ -2698,10 +2698,7 @@ hostsignature(m, host, e)
 
 #if NAMED_BIND
        if (ConfigLevel < 2)
 
 #if NAMED_BIND
        if (ConfigLevel < 2)
-       {
-               oldoptions = _res.options;
                _res.options &= ~(RES_DEFNAMES | RES_DNSRCH);   /* XXX */
                _res.options &= ~(RES_DEFNAMES | RES_DNSRCH);   /* XXX */
-       }
 
        for (hp = host; hp != NULL; hp = endp)
        {
 
        for (hp = host; hp != NULL; hp = endp)
        {
@@ -2719,9 +2716,7 @@ hostsignature(m, host, e)
                        mci = mci_get(hp, m);
                        mci->mci_exitstat = rcode;
                        mci->mci_errno = errno;
                        mci = mci_get(hp, m);
                        mci->mci_exitstat = rcode;
                        mci->mci_errno = errno;
-#if NAMED_BIND
                        mci->mci_herrno = h_errno;
                        mci->mci_herrno = h_errno;
-#endif
 
                        /* and return the original host name as the signature */
                        nmx = 1;
 
                        /* and return the original host name as the signature */
                        nmx = 1;
index 2ff8e3f..acdbfb1 100644 (file)
@@ -86,7 +86,8 @@ getmxrr(host, mxhosts, droplocalhost, rcode)
        querybuf answer;
        int ancount, qdcount, buflen;
        bool seenlocal = FALSE;
        querybuf answer;
        int ancount, qdcount, buflen;
        bool seenlocal = FALSE;
-       u_short pref, localpref, type;
+       u_short pref, type;
+       u_short localpref = 256;
        char *fallbackMX = FallBackMX;
        static bool firsttime = TRUE;
        bool trycanon = FALSE;
        char *fallbackMX = FallBackMX;
        static bool firsttime = TRUE;
        bool trycanon = FALSE;
@@ -431,7 +432,7 @@ getcanonname(host, hbsize, trymx)
        char **dp;
        char *mxmatch;
        bool amatch;
        char **dp;
        char *mxmatch;
        bool amatch;
-       bool gotmx;
+       bool gotmx = FALSE;
        int qtype;
        int loopcnt;
        char *xp;
        int qtype;
        int loopcnt;
        char *xp;
@@ -689,7 +690,7 @@ gethostalias(host)
 {
        char *fname;
        FILE *fp;
 {
        char *fname;
        FILE *fp;
-       register char *p;
+       register char *p = NULL;
        char buf[MAXLINE];
        static char hbuf[MAXDNAME];
 
        char buf[MAXLINE];
        static char hbuf[MAXDNAME];
 
index fc4a336..4a6d403 100644 (file)
@@ -13,7 +13,7 @@ static char copyright[] =
 #endif /* not lint */
 
 #ifndef lint
 #endif /* not lint */
 
 #ifndef lint
-static char sccsid[] = "@(#)main.c     8.83 (Berkeley) %G%";
+static char sccsid[] = "@(#)main.c     8.84 (Berkeley) %G%";
 #endif /* not lint */
 
 #define        _DEFINE
 #endif /* not lint */
 
 #define        _DEFINE
@@ -101,7 +101,6 @@ main(argc, argv, envp)
        register char *p;
        char **av;
        char *locname;
        register char *p;
        char **av;
        char *locname;
-       extern int finis();
        extern char Version[];
        char *ep, *from;
        typedef int (*fnptr)();
        extern char Version[];
        char *ep, *from;
        typedef int (*fnptr)();
@@ -1231,6 +1230,7 @@ main(argc, argv, envp)
 **             exits sendmail
 */
 
 **             exits sendmail
 */
 
+void
 finis()
 {
        if (tTd(2, 1))
 finis()
 {
        if (tTd(2, 1))
index ca689ac..60d063c 100644 (file)
@@ -7,7 +7,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)map.c      8.43 (Berkeley) %G%";
+static char sccsid[] = "@(#)map.c      8.44 (Berkeley) %G%";
 #endif /* not lint */
 
 #include "sendmail.h"
 #endif /* not lint */
 
 #include "sendmail.h"
@@ -2008,7 +2008,7 @@ user_map_lookup(map, key, av, statp)
                return map_rewrite(map, key, strlen(key), NULL);
        else
        {
                return map_rewrite(map, key, strlen(key), NULL);
        else
        {
-               char *rwval;
+               char *rwval = NULL;
                char buf[30];
 
                switch (map->map_valcolno)
                char buf[30];
 
                switch (map->map_valcolno)
index a6326b5..6982800 100644 (file)
@@ -7,7 +7,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)parseaddr.c        8.53 (Berkeley) %G%";
+static char sccsid[] = "@(#)parseaddr.c        8.54 (Berkeley) %G%";
 #endif /* not lint */
 
 #include "sendmail.h"
 #endif /* not lint */
 
 #include "sendmail.h"
@@ -209,7 +209,7 @@ invalidaddr(addr, delimptr)
        register char *addr;
        char *delimptr;
 {
        register char *addr;
        char *delimptr;
 {
-       char savedelim;
+       char savedelim = '\0';
 
        if (delimptr != NULL)
        {
 
        if (delimptr != NULL)
        {
@@ -1925,6 +1925,7 @@ struct qflags     AddressFlags[] =
        NULL
 };
 
        NULL
 };
 
+void
 void
 printaddr(a, follow)
        register ADDRESS *a;
 void
 printaddr(a, follow)
        register ADDRESS *a;
index 179ef6d..50f74f5 100644 (file)
@@ -10,9 +10,9 @@
 
 #ifndef lint
 #ifdef QUEUE
 
 #ifndef lint
 #ifdef QUEUE
-static char sccsid[] = "@(#)queue.c    8.41.1.1 (Berkeley) %G% (with queueing)";
+static char sccsid[] = "@(#)queue.c    8.63 (Berkeley) %G% (with queueing)";
 #else
 #else
-static char sccsid[] = "@(#)queue.c    8.41.1.1 (Berkeley) %G% (without queueing)";
+static char sccsid[] = "@(#)queue.c    8.63 (Berkeley) %G% (without queueing)";
 #endif
 #endif /* not lint */
 
 #endif
 #endif /* not lint */
 
@@ -462,6 +462,7 @@ printctladdr(a, tfp)
 
 ENVELOPE       QueueEnvelope;          /* the queue run envelope */
 
 
 ENVELOPE       QueueEnvelope;          /* the queue run envelope */
 
+void
 runqueue(forkflag)
        bool forkflag;
 {
 runqueue(forkflag)
        bool forkflag;
 {
index cf53622..2c29fc9 100644 (file)
@@ -7,7 +7,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)recipient.c        8.66 (Berkeley) %G%";
+static char sccsid[] = "@(#)recipient.c        8.67 (Berkeley) %G%";
 #endif /* not lint */
 
 # include "sendmail.h"
 #endif /* not lint */
 
 # include "sendmail.h"
@@ -817,7 +817,7 @@ writable(filename, ctladdr, flags)
 */
 
 static jmp_buf CtxIncludeTimeout;
 */
 
 static jmp_buf CtxIncludeTimeout;
-static int     includetimeout();
+static void    includetimeout();
 
 #ifndef S_IWOTH
 # define S_IWOTH       (S_IWRITE >> 6)
 
 #ifndef S_IWOTH
 # define S_IWOTH       (S_IWRITE >> 6)
@@ -832,7 +832,7 @@ include(fname, forwarding, ctladdr, sendq, aliaslevel, e)
        int aliaslevel;
        ENVELOPE *e;
 {
        int aliaslevel;
        ENVELOPE *e;
 {
-       register FILE *fp = NULL;
+       FILE *fp = NULL;
        char *oldto = e->e_to;
        char *oldfilename = FileName;
        int oldlinenumber = LineNumber;
        char *oldto = e->e_to;
        char *oldfilename = FileName;
        int oldlinenumber = LineNumber;
@@ -1095,7 +1095,7 @@ resetuid:
        return rval;
 }
 
        return rval;
 }
 
-static
+static void
 includetimeout()
 {
        longjmp(CtxIncludeTimeout, 1);
 includetimeout()
 {
        longjmp(CtxIncludeTimeout, 1);
index c7ed3fa..2c095ec 100644 (file)
@@ -5,7 +5,7 @@
  *
  * %sccs.include.redist.c%
  *
  *
  * %sccs.include.redist.c%
  *
- *     @(#)sendmail.h  8.88 (Berkeley) %G%
+ *     @(#)sendmail.h  8.89 (Berkeley) %G%
  */
 
 /*
  */
 
 /*
@@ -15,7 +15,7 @@
 # ifdef _DEFINE
 # define EXTERN
 # ifndef lint
 # ifdef _DEFINE
 # define EXTERN
 # ifndef lint
-static char SmailSccsId[] =    "@(#)sendmail.h 8.88            %G%";
+static char SmailSccsId[] =    "@(#)sendmail.h 8.89            %G%";
 # endif
 # else /*  _DEFINE */
 # define EXTERN extern
 # endif
 # else /*  _DEFINE */
 # define EXTERN extern
@@ -677,7 +677,7 @@ extern void         stabapply __P((void (*)(STAB *, int), int));
 struct event
 {
        time_t          ev_time;        /* time of the function call */
 struct event
 {
        time_t          ev_time;        /* time of the function call */
-       int             (*ev_func)__P((int));
+       void            (*ev_func)__P((int));
                                        /* function to call */
        int             ev_arg;         /* argument to ev_func */
        int             ev_pid;         /* pid that set this event */
                                        /* function to call */
        int             ev_arg;         /* argument to ev_func */
        int             ev_pid;         /* pid that set this event */
@@ -1017,7 +1017,7 @@ extern ADDRESS            *parseaddr __P((char *, ADDRESS *, int, int, char **, ENVELOPE *
 extern char            *xalloc __P((int));
 extern bool            sameaddr __P((ADDRESS *, ADDRESS *));
 extern FILE            *dfopen __P((char *, int, int));
 extern char            *xalloc __P((int));
 extern bool            sameaddr __P((ADDRESS *, ADDRESS *));
 extern FILE            *dfopen __P((char *, int, int));
-extern EVENT           *setevent __P((time_t, int(*)(), int));
+extern EVENT           *setevent __P((time_t, void(*)(), int));
 extern char            *sfgets __P((char *, int, FILE *, time_t, char *));
 extern char            *queuename __P((ENVELOPE *, int));
 extern time_t          curtime __P(());
 extern char            *sfgets __P((char *, int, FILE *, time_t, char *));
 extern char            *queuename __P((ENVELOPE *, int));
 extern time_t          curtime __P(());
@@ -1057,6 +1057,13 @@ extern bool              emptyaddr __P((ADDRESS *));
 extern int             sendtolist __P((char *, ADDRESS *, ADDRESS **, int, ENVELOPE *));
 extern bool            wordinclass __P((char *, char));
 extern char            *denlstring __P((char *));
 extern int             sendtolist __P((char *, ADDRESS *, ADDRESS **, int, ENVELOPE *));
 extern bool            wordinclass __P((char *, char));
 extern char            *denlstring __P((char *));
+extern void            printaddr __P((ADDRESS *, bool));
+extern void            makelower __P((char *));
+extern void            rebuildaliases __P((MAP *, bool));
+extern void            readaliases __P((MAP *, FILE *, bool, bool));
+extern void            finis __P(());
+extern void            clrevent __P((EVENT *));
+extern void            setsender __P((char *, ENVELOPE *, char **, bool));
 
 /* ellipsis is a different case though */
 #ifdef __STDC__
 
 /* ellipsis is a different case though */
 #ifdef __STDC__
index 9d18d8a..bf7e409 100644 (file)
@@ -10,9 +10,9 @@
 
 #ifndef lint
 #ifdef SMTP
 
 #ifndef lint
 #ifdef SMTP
-static char sccsid[] = "@(#)srvrsmtp.c 8.37.1.1 (Berkeley) %G% (with SMTP)";
+static char sccsid[] = "@(#)srvrsmtp.c 8.55 (Berkeley) %G% (with SMTP)";
 #else
 #else
-static char sccsid[] = "@(#)srvrsmtp.c 8.37.1.1 (Berkeley) %G% (without SMTP)";
+static char sccsid[] = "@(#)srvrsmtp.c 8.55 (Berkeley) %G% (without SMTP)";
 #endif
 #endif /* not lint */
 
 #endif
 #endif /* not lint */
 
index cf3836b..e572c0b 100644 (file)
@@ -10,9 +10,9 @@
 
 #ifndef lint
 #ifdef SMTP
 
 #ifndef lint
 #ifdef SMTP
-static char sccsid[] = "@(#)usersmtp.c 8.35 (Berkeley) %G% (with SMTP)";
+static char sccsid[] = "@(#)usersmtp.c 8.36 (Berkeley) %G% (with SMTP)";
 #else
 #else
-static char sccsid[] = "@(#)usersmtp.c 8.35 (Berkeley) %G% (without SMTP)";
+static char sccsid[] = "@(#)usersmtp.c 8.36 (Berkeley) %G% (without SMTP)";
 #endif
 #endif /* not lint */
 
 #endif
 #endif /* not lint */
 
@@ -559,7 +559,7 @@ smtprcpt(to, m, mci, e)
 */
 
 static jmp_buf CtxDataTimeout;
 */
 
 static jmp_buf CtxDataTimeout;
-static int     datatimeout();
+static void    datatimeout();
 
 smtpdata(m, mci, e)
        struct mailer *m;
 
 smtpdata(m, mci, e)
        struct mailer *m;
@@ -686,7 +686,7 @@ smtpdata(m, mci, e)
 }
 
 
 }
 
 
-static int
+static void
 datatimeout()
 {
        longjmp(CtxDataTimeout, 1);
 datatimeout()
 {
        longjmp(CtxDataTimeout, 1);
index 78a5a81..3fc19ee 100644 (file)
@@ -7,7 +7,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)util.c     8.49 (Berkeley) %G%";
+static char sccsid[] = "@(#)util.c     8.50 (Berkeley) %G%";
 #endif /* not lint */
 
 # include "sendmail.h"
 #endif /* not lint */
 
 # include "sendmail.h"
@@ -318,6 +318,7 @@ xputs(s)
 **             parse
 */
 
 **             parse
 */
 
+void
 makelower(p)
        register char *p;
 {
 makelower(p)
        register char *p;
 {
@@ -885,7 +886,7 @@ xfclose(fp, a, b)
 */
 
 static jmp_buf CtxReadTimeout;
 */
 
 static jmp_buf CtxReadTimeout;
-static int     readtimeout();
+static void    readtimeout();
 
 char *
 sfgets(buf, siz, fp, timeout, during)
 
 char *
 sfgets(buf, siz, fp, timeout, during)
@@ -970,7 +971,7 @@ sfgets(buf, siz, fp, timeout, during)
        return (buf);
 }
 
        return (buf);
 }
 
-static
+static void
 readtimeout(timeout)
        time_t timeout;
 {
 readtimeout(timeout)
        time_t timeout;
 {