]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
ntpq.c:
authorJuergen Perlinger <perlinger@ntp.org>
Wed, 24 Mar 2010 21:46:41 +0000 (22:46 +0100)
committerJuergen Perlinger <perlinger@ntp.org>
Wed, 24 Mar 2010 21:46:41 +0000 (22:46 +0100)
  fix printf format warnings

bk: 4baa8841tBx9fUb-gdwSSGO0z-rnOg

ntpq/ntpq.c

index de89017c3aa1f78dcc4eac7d5dca03c344b05e00..fe3f85833ff46f57d52766655bbbee1bd610f0f2 100644 (file)
@@ -794,7 +794,7 @@ sendpkt(
        )
 {
        if (debug >= 3)
-               printf("Sending %u octets\n", xdatalen);
+           printf("Sending %lu octets\n", (u_long)xdatalen);
 
        if (send(sockfd, xdata, (size_t)xdatalen, 0) == -1) {
                warning("write to %s failed", currenthost, "");
@@ -1311,9 +1311,9 @@ sendrequest(
                return 1;
        } else if ((size_t)maclen != (info_auth_hashlen + sizeof(keyid_t))) {
                fprintf(stderr,
-                       "%d octet MAC, %u expected with %u octet digest\n",
-                       maclen, (info_auth_hashlen + sizeof(keyid_t)),
-                       info_auth_hashlen);
+                       "%d octet MAC, %lu expected with %lu octet digest\n",
+                       maclen, (u_long)(info_auth_hashlen + sizeof(keyid_t)),
+                       (u_long)info_auth_hashlen);
                return 1;
        }
        
@@ -2392,9 +2392,9 @@ keytype(
        int             key_type;
 
        if (!pcmd->nargs) {
-               fprintf(fp, "keytype is %s with %u octet digests\n",
+               fprintf(fp, "keytype is %s with %lu octet digests\n",
                        keytype_name(info_auth_keytype),
-                       info_auth_hashlen);
+                       (u_long)info_auth_hashlen);
                return;
        }