lint for 4.3 release
authorEric Allman <eric@ucbvax.Berkeley.EDU>
Sun, 9 Jun 1985 01:31:19 +0000 (17:31 -0800)
committerEric Allman <eric@ucbvax.Berkeley.EDU>
Sun, 9 Jun 1985 01:31:19 +0000 (17:31 -0800)
SCCS-vsn: usr.sbin/sendmail/src/arpadate.c 5.3
SCCS-vsn: usr.sbin/sendmail/src/queue.c 5.4
SCCS-vsn: usr.sbin/sendmail/src/headers.c 5.4
SCCS-vsn: usr.sbin/sendmail/src/conf.c 5.3
SCCS-vsn: usr.sbin/sendmail/src/main.c 5.4
SCCS-vsn: usr.sbin/sendmail/src/daemon.c 5.4
SCCS-vsn: usr.sbin/sendmail/src/util.c 5.5
SCCS-vsn: usr.sbin/sendmail/src/srvrsmtp.c 5.4
SCCS-vsn: usr.sbin/sendmail/src/stats.c 5.3
SCCS-vsn: usr.sbin/sendmail/src/clock.c 5.2
SCCS-vsn: usr.sbin/sendmail/src/version.c 5.2
SCCS-vsn: usr.sbin/sendmail/src/usersmtp.c 5.3

12 files changed:
usr/src/usr.sbin/sendmail/src/arpadate.c
usr/src/usr.sbin/sendmail/src/clock.c
usr/src/usr.sbin/sendmail/src/conf.c
usr/src/usr.sbin/sendmail/src/daemon.c
usr/src/usr.sbin/sendmail/src/headers.c
usr/src/usr.sbin/sendmail/src/main.c
usr/src/usr.sbin/sendmail/src/queue.c
usr/src/usr.sbin/sendmail/src/srvrsmtp.c
usr/src/usr.sbin/sendmail/src/stats.c
usr/src/usr.sbin/sendmail/src/usersmtp.c
usr/src/usr.sbin/sendmail/src/util.c
usr/src/usr.sbin/sendmail/src/version.c

index 7def4d3..71bc175 100644 (file)
@@ -9,7 +9,7 @@
 */
 
 #ifndef lint
 */
 
 #ifndef lint
-static char    SccsId[] = "@(#)arpadate.c      5.2 (Berkeley) %G%";
+static char    SccsId[] = "@(#)arpadate.c      5.3 (Berkeley) %G%";
 #endif not lint
 
 # include "conf.h"
 #endif not lint
 
 # include "conf.h"
@@ -224,6 +224,8 @@ fconvert(a, b)
 
        for (euptr = Foreign; euptr->f_from != NULL; euptr++)
        {
 
        for (euptr = Foreign; euptr->f_from != NULL; euptr++)
        {
+               extern bool sameword();
+
                if (sameword(euptr->f_from, a))
                {
                        p = euptr->f_to;
                if (sameword(euptr->f_from, a))
                {
                        p = euptr->f_to;
index 0a5a46a..d0a4d3b 100644 (file)
@@ -9,7 +9,7 @@
 */
 
 #ifndef lint
 */
 
 #ifndef lint
-static char    SccsId[] = "@(#)clock.c 5.1 (Berkeley) %G%";
+static char    SccsId[] = "@(#)clock.c 5.2 (Berkeley) %G%";
 #endif not lint
 
 # include "sendmail.h"
 #endif not lint
 
 # include "sendmail.h"
index 2d4b64d..9b1c971 100644 (file)
@@ -9,7 +9,7 @@
 */
 
 #ifndef lint
 */
 
 #ifndef lint
-static char    SccsId[] = "@(#)conf.c  5.2 (Berkeley) %G%";
+static char    SccsId[] = "@(#)conf.c  5.3 (Berkeley) %G%";
 #endif not lint
 
 # include <pwd.h>
 #endif not lint
 
 # include <pwd.h>
@@ -533,13 +533,13 @@ getla()
                kmem = open("/dev/kmem", 0);
                if (kmem < 0)
                        return (-1);
                kmem = open("/dev/kmem", 0);
                if (kmem < 0)
                        return (-1);
-               (void) ioctl(kmem, FIOCLEX, 0);
+               (void) ioctl(kmem, (int) FIOCLEX, (char *) 0);
                nlist("/vmunix", Nl);
                if (Nl[0].n_type == 0)
                        return (-1);
        }
                nlist("/vmunix", Nl);
                if (Nl[0].n_type == 0)
                        return (-1);
        }
-       if (lseek(kmem, (long) Nl[X_AVENRUN].n_value, 0) < 0 ||
-           read(kmem, avenrun, sizeof(avenrun)) < sizeof(avenrun))
+       if (lseek(kmem, (off_t) Nl[X_AVENRUN].n_value, 0) < 0 ||
+           read(kmem, (char *) avenrun, sizeof(avenrun)) < sizeof(avenrun))
        {
                /* thank you Ian */
                return (-1);
        {
                /* thank you Ian */
                return (-1);
@@ -555,27 +555,3 @@ getla()
 }
 
 #endif VMUNIX
 }
 
 #endif VMUNIX
-\f/*
-**  DBMCLOSE -- close the DBM file
-**
-**     This depends on the implementation of the DBM library.  It
-**     seems to work for all versions that I have come across.
-**
-**     Parameters:
-**             none.
-**
-**     Returns:
-**             none.
-**
-**     Side Effects:
-**             Closes the current DBM file; dbminit must be
-**             called again to continue using the DBM routines.
-*/
-
-dbmclose()
-{
-       extern int pagf, dirf;  /* defined in the DBM package */
-
-       (void) close(pagf);
-       (void) close(dirf);
-}
index 9594c24..23813dc 100644 (file)
 # include "sendmail.h"
 # include <sys/mx.h>
 
 # include "sendmail.h"
 # include <sys/mx.h>
 
-#ifndef DAEMON
-static char    SccsId[] = "@(#)daemon.c        5.3 (Berkeley) %G%      (w/o daemon mode)";
-#else
-
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <netdb.h>
-#include <sys/wait.h>
-
-static char    SccsId[] = "@(#)daemon.c        5.3 (Berkeley) %G% (with daemon mode)";
+# ifndef DAEMON
+# ifndef lint
+static char    SccsId[] = "@(#)daemon.c        5.4 (Berkeley) %G%      (w/o daemon mode)";
+# endif not lint
+# else
+
+# include <sys/socket.h>
+# include <netinet/in.h>
+# include <netdb.h>
+# include <sys/wait.h>
+# include <sys/time.h>
+# include <sys/resource.h>
+
+# ifndef lint
+static char    SccsId[] = "@(#)daemon.c        5.4 (Berkeley) %G% (with daemon mode)";
+# endif not lint
 
 /*
 **  DAEMON.C -- routines to use when running as a daemon.
 
 /*
 **  DAEMON.C -- routines to use when running as a daemon.
@@ -108,7 +114,7 @@ getrequests()
 # endif DEBUG
 
        /* get a socket for the SMTP connection */
 # endif DEBUG
 
        /* get a socket for the SMTP connection */
-       DaemonSocket = socket(AF_INET, SOCK_STREAM, 0, 0);
+       DaemonSocket = socket(AF_INET, SOCK_STREAM, 0);
        if (DaemonSocket < 0)
        {
                /* probably another daemon already */
        if (DaemonSocket < 0)
        {
                /* probably another daemon already */
@@ -127,13 +133,18 @@ getrequests()
                (void) setsockopt(DaemonSocket, SOL_SOCKET, SO_DEBUG, 0, 0);
 #endif DEBUG
 
                (void) setsockopt(DaemonSocket, SOL_SOCKET, SO_DEBUG, 0, 0);
 #endif DEBUG
 
-       if (bind(DaemonSocket, &SendmailAddress, sizeof SendmailAddress, 0) < 0)
+       if (bind(DaemonSocket, &SendmailAddress, sizeof SendmailAddress) < 0)
        {
                syserr("getrequests: cannot bind");
                (void) close(DaemonSocket);
                goto severe;
        }
        {
                syserr("getrequests: cannot bind");
                (void) close(DaemonSocket);
                goto severe;
        }
-       listen(DaemonSocket, 10);
+       if (listen(DaemonSocket, 10) < 0)
+       {
+               syserr("getrequests: cannot listen");
+               (void) close(DaemonSocket);
+               goto severe;
+       }
 
 # ifdef DEBUG
        if (tTd(15, 1))
 
 # ifdef DEBUG
        if (tTd(15, 1))
@@ -236,7 +247,7 @@ makeconnection(host, port, outfile, infile)
 #ifdef NVMUNIX
        s = socket(AF_INET, SOCK_STREAM, 0, 0);
 #else NVMUNIX
 #ifdef NVMUNIX
        s = socket(AF_INET, SOCK_STREAM, 0, 0);
 #else NVMUNIX
-       s = socket(AF_INET, SOCK_STREAM, 0, 0);
+       s = socket(AF_INET, SOCK_STREAM, 0);
 #endif NVMUNIX
        if (s < 0)
        {
 #endif NVMUNIX
        if (s < 0)
        {
@@ -259,7 +270,7 @@ makeconnection(host, port, outfile, infile)
        if (connect(s, &SendmailAddress, sizeof SendmailAddress, 0) < 0)
 #else NVMUNIX
        SendmailAddress.sin_family = AF_INET;
        if (connect(s, &SendmailAddress, sizeof SendmailAddress, 0) < 0)
 #else NVMUNIX
        SendmailAddress.sin_family = AF_INET;
-       if (connect(s, &SendmailAddress, sizeof SendmailAddress, 0) < 0)
+       if (connect(s, &SendmailAddress, sizeof SendmailAddress) < 0)
 #endif NVMUNIX
        {
                /* failure, decide if temporary or not */
 #endif NVMUNIX
        {
                /* failure, decide if temporary or not */
@@ -322,7 +333,10 @@ myhostname(hostbuf, size)
        extern struct hostent *gethostbyname();
        struct hostent *hp;
 
        extern struct hostent *gethostbyname();
        struct hostent *hp;
 
-       gethostname(hostbuf, size);
+       if (gethostname(hostbuf, size) < 0)
+       {
+               (void) strcpy(hostbuf, "localhost");
+       }
        hp = gethostbyname(hostbuf);
        if (hp != NULL)
        {
        hp = gethostbyname(hostbuf);
        if (hp != NULL)
        {
index 9071ba6..bb790cc 100644 (file)
@@ -9,7 +9,7 @@
 */
 
 #ifndef lint
 */
 
 #ifndef lint
-static char    SccsId[] = "@(#)headers.c       5.3 (Berkeley) %G%";
+static char    SccsId[] = "@(#)headers.c       5.4 (Berkeley) %G%";
 #endif not lint
 
 # include <errno.h>
 #endif not lint
 
 # include <errno.h>
@@ -129,7 +129,7 @@ chompheader(line, def)
        h->h_field = newstr(fname);
        h->h_value = NULL;
        h->h_link = NULL;
        h->h_field = newstr(fname);
        h->h_value = NULL;
        h->h_link = NULL;
-       bcopy(mopts, h->h_mflags, sizeof mopts);
+       bcopy((char *) mopts, (char *) h->h_mflags, sizeof mopts);
        *hp = h;
        h->h_flags = hi->hi_flags;
        if (def)
        *hp = h;
        h->h_flags = hi->hi_flags;
        if (def)
index dd9e929..17fab4e 100644 (file)
@@ -15,7 +15,7 @@ char copyright[] =
 #endif not lint
 
 #ifndef lint
 #endif not lint
 
 #ifndef lint
-static char    SccsId[] = "@(#)main.c  5.3 (Berkeley) %G%";
+static char    SccsId[] = "@(#)main.c  5.4 (Berkeley) %G%";
 #endif not lint
 
 # define  _DEFINE
 #endif not lint
 
 # define  _DEFINE
@@ -23,6 +23,10 @@ static char  SccsId[] = "@(#)main.c  5.3 (Berkeley) %G%";
 # include <sgtty.h>
 # include "sendmail.h"
 
 # include <sgtty.h>
 # include "sendmail.h"
 
+# ifdef lint
+char   edata;
+# endif lint
+
 /*
 **  SENDMAIL -- Post mail to a set of destinations.
 **
 /*
 **  SENDMAIL -- Post mail to a set of destinations.
 **
@@ -853,6 +857,7 @@ thaw(freezefile)
        union frz fhdr;
        extern char edata;
        extern char Version[];
        union frz fhdr;
        extern char edata;
        extern char Version[];
+       extern caddr_t brk();
 
        if (freezefile == NULL)
                return (FALSE);
 
        if (freezefile == NULL)
                return (FALSE);
@@ -874,7 +879,7 @@ thaw(freezefile)
        }
 
        /* arrange to have enough space */
        }
 
        /* arrange to have enough space */
-       if (brk(fhdr.frzinfo.frzbrk) < 0)
+       if (brk(fhdr.frzinfo.frzbrk) == (caddr_t) -1)
        {
                syserr("Cannot break to %x", fhdr.frzinfo.frzbrk);
                (void) close(f);
        {
                syserr("Cannot break to %x", fhdr.frzinfo.frzbrk);
                (void) close(f);
@@ -966,10 +971,10 @@ disconnect(fulldrop)
                fd = open("/dev/tty", 2);
                if (fd >= 0)
                {
                fd = open("/dev/tty", 2);
                if (fd >= 0)
                {
-                       (void) ioctl(fd, TIOCNOTTY, 0);
+                       (void) ioctl(fd, (int) TIOCNOTTY, (char *) 0);
                        (void) close(fd);
                }
                        (void) close(fd);
                }
-               (void) setpgrp(0);
+               (void) setpgrp(0, 0);
                errno = 0;
        }
 #endif TIOCNOTTY
                errno = 0;
        }
 #endif TIOCNOTTY
index f79b48f..9648219 100644 (file)
 # include <errno.h>
 
 # ifndef QUEUE
 # include <errno.h>
 
 # ifndef QUEUE
-static char    SccsId[] = "@(#)queue.c 5.3 (Berkeley) %G%      (no queueing)";
+# ifndef lint
+static char    SccsId[] = "@(#)queue.c 5.4 (Berkeley) %G%      (no queueing)";
+# endif not lint
 # else QUEUE
 
 # else QUEUE
 
-static char    SccsId[] = "@(#)queue.c 5.3 (Berkeley) %G%";
+# ifndef lint
+static char    SccsId[] = "@(#)queue.c 5.4 (Berkeley) %G%";
+# endif not lint
 
 /*
 **  Work queue.
 
 /*
 **  Work queue.
@@ -417,7 +421,7 @@ orderq()
        **  Sort the work directory.
        */
 
        **  Sort the work directory.
        */
 
-       qsort(wlist, min(wn, WLSIZE), sizeof *wlist, workcmpf);
+       qsort((char *) wlist, min(wn, WLSIZE), sizeof *wlist, workcmpf);
 
        /*
        **  Convert the work list into canonical form.
 
        /*
        **  Convert the work list into canonical form.
index 8dc74fa..c230f3e 100644 (file)
 # include <signal.h>
 
 # ifndef SMTP
 # include <signal.h>
 
 # ifndef SMTP
-static char    SccsId[] = "@(#)srvrsmtp.c      5.3 (Berkeley) %G%      (no SMTP)";
+# ifndef lint
+static char    SccsId[] = "@(#)srvrsmtp.c      5.4 (Berkeley) %G%      (no SMTP)";
+# endif not lint
 # else SMTP
 
 # else SMTP
 
-static char    SccsId[] = "@(#)srvrsmtp.c      5.3 (Berkeley) %G%";
+# ifndef lint
+static char    SccsId[] = "@(#)srvrsmtp.c      5.4 (Berkeley) %G%";
+# endif not lint
 
 /*
 **  SMTP -- run the SMTP protocol.
 
 /*
 **  SMTP -- run the SMTP protocol.
index 42e5698..7f7e3af 100644 (file)
@@ -9,7 +9,7 @@
 */
 
 #ifndef lint
 */
 
 #ifndef lint
-static char    SccsId[] = "@(#)stats.c 5.2 (Berkeley) %G%";
+static char    SccsId[] = "@(#)stats.c 5.3 (Berkeley) %G%";
 #endif not lint
 
 # include "sendmail.h"
 #endif not lint
 
 # include "sendmail.h"
@@ -67,7 +67,7 @@ poststats(sfile)
 {
        register int fd;
        struct statistics stat;
 {
        register int fd;
        struct statistics stat;
-       extern long lseek();
+       extern off_t lseek();
 
        (void) time(&Stat.stat_itime);
        Stat.stat_size = sizeof Stat;
 
        (void) time(&Stat.stat_itime);
        Stat.stat_size = sizeof Stat;
@@ -96,7 +96,7 @@ poststats(sfile)
                bcopy((char *) &Stat, (char *) &stat, sizeof stat);
 
        /* write out results */
                bcopy((char *) &Stat, (char *) &stat, sizeof stat);
 
        /* write out results */
-       (void) lseek(fd, 0L, 0);
+       (void) lseek(fd, (off_t) 0, 0);
        (void) write(fd, (char *) &stat, sizeof stat);
        (void) close(fd);
 }
        (void) write(fd, (char *) &stat, sizeof stat);
        (void) close(fd);
 }
index 3d38d0d..8ec2811 100644 (file)
@@ -8,8 +8,6 @@
 **  specifies the terms and conditions for redistribution.
 */
 
 **  specifies the terms and conditions for redistribution.
 */
 
-#ifndef lint
-#endif not lint
 
 # include <ctype.h>
 # include <sysexits.h>
 
 # include <ctype.h>
 # include <sysexits.h>
 # include "sendmail.h"
 
 # ifndef SMTP
 # include "sendmail.h"
 
 # ifndef SMTP
-static char    SccsId[] = "@(#)usersmtp.c      5.2 (Berkeley) %G%      (no SMTP)";
+# ifndef lint
+static char    SccsId[] = "@(#)usersmtp.c      5.3 (Berkeley) %G%      (no SMTP)";
+# endif not lint
 # else SMTP
 
 # else SMTP
 
-static char    SccsId[] = "@(#)usersmtp.c      5.2 (Berkeley) %G%";
+# ifndef lint
+static char    SccsId[] = "@(#)usersmtp.c      5.3 (Berkeley) %G%";
+# endif not lint
 
 
 
 
 
 
index 4b2a54c..7f66dad 100644 (file)
@@ -9,7 +9,7 @@
 */
 
 #ifndef lint
 */
 
 #ifndef lint
-static char    SccsId[] = "@(#)util.c  5.4 (Berkeley) %G%";
+static char    SccsId[] = "@(#)util.c  5.5 (Berkeley) %G%";
 #endif not lint
 
 # include <stdio.h>
 #endif not lint
 
 # include <stdio.h>
@@ -145,8 +145,9 @@ xalloc(sz)
        register int sz;
 {
        register char *p;
        register int sz;
 {
        register char *p;
+       extern char *malloc();
 
 
-       p = malloc(sz);
+       p = malloc((unsigned) sz);
        if (p == NULL)
        {
                syserr("Out of memory!!");
        if (p == NULL)
        {
                syserr("Out of memory!!");
index b929b77..c053fd3 100644 (file)
@@ -9,7 +9,7 @@
 */
 
 #ifndef lint
 */
 
 #ifndef lint
-static char    SccsId[] = "@(#)version.c       5.1 (Berkeley) %G%";
+static char    SccsId[] = "@(#)version.c       5.2 (Berkeley) %G%";
 #endif not lint
 
 #endif not lint
 
-char   Version[] = "5.1";
+char   Version[] = "5.2";