diff options
author | John Kohl <jtkohl@mit.edu> | 1988-06-23 09:45:23 +0000 |
---|---|---|
committer | John Kohl <jtkohl@mit.edu> | 1988-06-23 09:45:23 +0000 |
commit | f1152651df2eb53f646f00c02fde121d9a8bf2df (patch) | |
tree | 16888954cc46be5ca96203e2c20ff826e5f3cb0e | |
parent | 25a1f6bb6d56eaa582de008fc9d5618a484cfc6f (diff) |
lint fixes
-rw-r--r-- | clients/zpopnotify/zpopnotify.c | 9 | ||||
-rw-r--r-- | clients/zshutdown_notify/zshutdown_notify.c | 11 |
2 files changed, 12 insertions, 8 deletions
diff --git a/clients/zpopnotify/zpopnotify.c b/clients/zpopnotify/zpopnotify.c index aed159a..dd59b52 100644 --- a/clients/zpopnotify/zpopnotify.c +++ b/clients/zpopnotify/zpopnotify.c @@ -15,6 +15,7 @@ #include <zephyr/zephyr.h> #include <netdb.h> +#include <string.h> #ifndef lint static char rcsid_zpopnotify_c[] = "$Header$"; @@ -32,7 +33,7 @@ main(argc,argv) ZNotice_t notice; struct hostent *hent; int retval; - char *whoami,*ptr,bfr[BUFSIZ],myhost[BUFSIZ],mysender[BUFSIZ]; + char *whoami,*ptr,myhost[BUFSIZ],mysender[BUFSIZ]; char *lines[2]; whoami = argv[0]; @@ -63,12 +64,12 @@ main(argc,argv) exit(1); } - strcpy(myhost,hent->h_name); + (void) strcpy(myhost,hent->h_name); lines[0] = myhost; lines[1] = "You have new mail."; - strcpy(mysender,"pop@"); - strcat(mysender,ZGetRealm()); + (void) strcpy(mysender,"pop@"); + (void) strcat(mysender,ZGetRealm()); notice.z_kind = UNSAFE; notice.z_class = MAIL_CLASS; diff --git a/clients/zshutdown_notify/zshutdown_notify.c b/clients/zshutdown_notify/zshutdown_notify.c index 10e89d7..85f884a 100644 --- a/clients/zshutdown_notify/zshutdown_notify.c +++ b/clients/zshutdown_notify/zshutdown_notify.c @@ -19,6 +19,7 @@ #include <sys/socket.h> #include <netdb.h> #include <stdio.h> +#include <string.h> #ifndef lint #ifndef SABER @@ -39,11 +40,12 @@ static char *rcsid_zshutdown_notify_c = "$Header$"; static char warning[] = "Please detach any filesystems you may have\nattached from this host!"; +/*ARGSUSED*/ main(argc,argv) int argc; char *argv[]; { - ZNotice_t notice, retnotice; + ZNotice_t notice; struct hostent *hp; int retval; char hostname[MAXHOSTNAMELEN]; @@ -64,7 +66,8 @@ main(argc,argv) exit(1); } - if ((hp = gethostbyname(hostname)) != NULL) strcpy(hostname, hp->h_name); + if ((hp = gethostbyname(hostname)) != NULL) + (void) strcpy(hostname, hp->h_name); ptr = message; @@ -74,11 +77,11 @@ main(argc,argv) if ((strlen(msgbuff) + (ptr - message)) > Z_MAXPKTLEN){ break; } - strcpy(ptr, msgbuff); + (void) strcpy(ptr, msgbuff); ptr += strlen(ptr); } - bzero(¬ice, sizeof(ZNotice_t)); + bzero((char *)¬ice, sizeof(ZNotice_t)); notice.z_kind = N_KIND; notice.z_port = 0; |