diff options
-rw-r--r-- | zhm/zhm.c | 12 | ||||
-rw-r--r-- | zhm/zhm.h | 3 | ||||
-rw-r--r-- | zhm/zhm_client.c | 2 | ||||
-rw-r--r-- | zhm/zhm_server.c | 3 |
4 files changed, 12 insertions, 8 deletions
@@ -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) @@ -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); |