summaryrefslogtreecommitdiff
path: root/zhm
diff options
context:
space:
mode:
authorGravatar John Kohl <jtkohl@mit.edu>1988-06-23 10:39:13 +0000
committerGravatar John Kohl <jtkohl@mit.edu>1988-06-23 10:39:13 +0000
commitb511734ca5c28f7b72f8fc64dfe5f341201003fe (patch)
treebd5f403dec142ff432871da097c3b5a667b9897b /zhm
parentdf1a134382999f5bcf47e872d55f9334e0f0265e (diff)
lint fixes
Diffstat (limited to 'zhm')
-rw-r--r--zhm/zhm.c12
-rw-r--r--zhm/zhm.h3
-rw-r--r--zhm/zhm_client.c2
-rw-r--r--zhm/zhm_server.c3
4 files changed, 12 insertions, 8 deletions
diff --git a/zhm/zhm.c b/zhm/zhm.c
index ec6723c..d0c6cc5 100644
--- a/zhm/zhm.c
+++ b/zhm/zhm.c
@@ -49,7 +49,7 @@ extern char *index(), *strcpy(), *sbrk();
extern long time();
void init_hm(), detach(), handle_timeout(), resend_notices(), die_gracefully();
-void set_sig_type();
+int set_sig_type();
#if BSD < 43
char *upcase();
@@ -134,7 +134,8 @@ char *argv[];
if ((c = index(*clust_info, ' ')) == 0) {
printf("Hesiod error getting zcluster info.\n");
} else {
- if ((zcluster = malloc(strlen(c+1)+1)) != NULL) {
+ if ((zcluster = malloc((unsigned)(strlen(c+1)+1)))
+ != NULL) {
(void)strcpy(zcluster, c+1);
} else {
printf("Out of memory.\n");
@@ -147,7 +148,7 @@ char *argv[];
#endif HESIOD
if (zcluster == NULL) {
- if ((zcluster = malloc(strlen("zephyr")+1)) != NULL)
+ if ((zcluster = malloc((unsigned)(strlen("zephyr")+1))) != NULL)
(void)strcpy(zcluster, "zephyr");
}
}
@@ -298,7 +299,7 @@ void init_hm()
}
if (inetd) {
- ZSetFD(0); /* fd 0 is on the socket,
+ (void) ZSetFD(0); /* fd 0 is on the socket,
thanks to inetd */
} else {
/* Open client socket, for receiving client and server notices */
@@ -401,10 +402,11 @@ void detach()
}
}
-void set_sig_type(sig)
+int set_sig_type(sig)
int sig;
{
sig_type = sig;
+ return(0);
}
send_stats(notice, sin)
diff --git a/zhm/zhm.h b/zhm/zhm.h
index 52924dd..94d9c9b 100644
--- a/zhm/zhm.h
+++ b/zhm/zhm.h
@@ -20,6 +20,9 @@
#include <sys/socket.h>
#include <sys/param.h>
#include <netdb.h>
+#ifdef lint
+#include <sys/uio.h> /* make lint shut up */
+#endif /* lint */
#ifdef DEBUG
#define DPR(a) fprintf(stderr, a); fflush(stderr)
diff --git a/zhm/zhm_client.c b/zhm/zhm_client.c
index e4c14bf..35db64a 100644
--- a/zhm/zhm_client.c
+++ b/zhm/zhm_client.c
@@ -75,7 +75,7 @@ transmission_tower(notice, packet, pak_len)
Zperr(ret);
com_err("hm", ret, "while sending raw notice");
}
- if ((tleft = alarm(0)) > 0)
+ if (tleft = alarm(0))
(void)alarm(tleft);
else {
timeout_type = NOTICES;
diff --git a/zhm/zhm_server.c b/zhm/zhm_server.c
index 096d9cd..5435842 100644
--- a/zhm/zhm_server.c
+++ b/zhm/zhm_server.c
@@ -187,8 +187,7 @@ ZNotice_t *notice;
if (!strcmp(notice->z_opcode, SERVER_SHUTDOWN)) {
if (notice->z_message_len) {
addr = inet_addr(notice->z_message);
- if ((hp = gethostbyaddr(&addr,
- 4,
+ if ((hp = gethostbyaddr((char *)&addr, sizeof(addr),
AF_INET)) != NULL) {
(void)strcpy(suggested_server, hp->h_name);
new_server(suggested_server);