TWO BUGS (printf doesn't take a FILE *, plus wrong arg to gettimeofday)
authorKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Sun, 18 Oct 1992 05:26:54 +0000 (21:26 -0800)
committerKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Sun, 18 Oct 1992 05:26:54 +0000 (21:26 -0800)
lint to make cc shut up

SCCS-vsn: old/talk/talkd/print.c 5.2
SCCS-vsn: old/talk/talkd/process.c 5.2
SCCS-vsn: old/talk/talkd/table.c 5.2
SCCS-vsn: old/talk/talkd/talkd.c 5.2

usr/src/old/talk/talkd/print.c
usr/src/old/talk/talkd/process.c
usr/src/old/talk/talkd/table.c
usr/src/old/talk/talkd/talkd.c

index 4fd77f9..296b625 100644 (file)
@@ -31,7 +31,7 @@ print_response(response)
 {
        extern FILE *debugout;
        
 {
        extern FILE *debugout;
        
-       printf(debugout
+       fprintf(debugout
                , "type is %d, answer is %d, id = %d\n\n", response->type
                , response->answer, response->id_num);
        fflush(debugout);
                , "type is %d, answer is %d, id = %d\n\n", response->type
                , response->answer, response->id_num);
        fflush(debugout);
index 4229724..6524693 100644 (file)
@@ -84,7 +84,7 @@ do_announce(request, response)
                response->answer = result;
                return;
        }
                response->answer = result;
                return;
        }
-       hp = gethostbyaddr(&request->ctl_addr.sin_addr,
+       hp = gethostbyaddr((char *)&request->ctl_addr.sin_addr,
                sizeof(struct in_addr), AF_INET);
        if (hp == (struct hostent *)0) {
                response->answer = MACHINE_UNKNOWN;
                sizeof(struct in_addr), AF_INET);
        if (hp == (struct hostent *)0) {
                response->answer = MACHINE_UNKNOWN;
index 85e3df4..4d843a3 100644 (file)
@@ -27,7 +27,7 @@ static char sccsid[] = "@(#)table.c   5.1 (Berkeley) 6/6/85";
 
 extern int debug;
 struct timeval tp;
 
 extern int debug;
 struct timeval tp;
-struct timezone *txp;
+struct timezone txp;
 
 typedef struct table_entry TABLE_ENTRY;
 
 
 typedef struct table_entry TABLE_ENTRY;
 
index 876d28b..7ee6e5f 100644 (file)
@@ -34,7 +34,7 @@ CTL_RESPONSE  response;
 int    sockt;
 int    debug = 0;
 FILE   *debugout;
 int    sockt;
 int    debug = 0;
 FILE   *debugout;
-int    timeout();
+void   timeout();
 long   lastmsgtime;
 
 char   hostname[32];
 long   lastmsgtime;
 
 char   hostname[32];
@@ -64,8 +64,8 @@ main(argc, argv)
                extern int errno;
 
                fromlen = sizeof(from);
                extern int errno;
 
                fromlen = sizeof(from);
-               cc = recvfrom(0, (char *)&request, sizeof (request), 0,
-                   &from, &fromlen);
+               cc = recvfrom(0, (char *) &request, sizeof (request), 0,
+                   (struct sockaddr *)&from, &fromlen);
                if (cc != sizeof(request)) {
                        if (cc < 0 && errno != EINTR)
                        perror("recvfrom");
                if (cc != sizeof(request)) {
                        if (cc < 0 && errno != EINTR)
                        perror("recvfrom");
@@ -77,13 +77,14 @@ main(argc, argv)
                process_request(&request, &response);
                /* can block here, is this what I want? */
                cc = sendto(sockt, (char *) &response,
                process_request(&request, &response);
                /* can block here, is this what I want? */
                cc = sendto(sockt, (char *) &response,
-                   sizeof (response), 0, &request.ctl_addr,
+                   sizeof (response), 0, (struct sockaddr *)&request.ctl_addr,
                    sizeof (request.ctl_addr));
                if (cc != sizeof(response))
                        perror("sendto");
        }
 }
 
                    sizeof (request.ctl_addr));
                if (cc != sizeof(response))
                        perror("sendto");
        }
 }
 
+void
 timeout()
 {
 
 timeout()
 {