summaryrefslogtreecommitdiff
path: root/usr.sbin/xntpd/lib/numtoa.c
diff options
context:
space:
mode:
authorGarrett Wollman <wollman@FreeBSD.org>1994-09-29 23:04:24 +0000
committerGarrett Wollman <wollman@FreeBSD.org>1994-09-29 23:04:24 +0000
commitdaa35edbd086b27357d8f048ede7c84dcc520748 (patch)
tree8dd520f3dfb7df4f73618d886e20c1154f3e5e5f /usr.sbin/xntpd/lib/numtoa.c
parentd2d2eed18837c57f97405aa88134457f8d97640d (diff)
Notes
Diffstat (limited to 'usr.sbin/xntpd/lib/numtoa.c')
-rw-r--r--usr.sbin/xntpd/lib/numtoa.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/usr.sbin/xntpd/lib/numtoa.c b/usr.sbin/xntpd/lib/numtoa.c
index c36885d19e686..ef291c8d6bcd4 100644
--- a/usr.sbin/xntpd/lib/numtoa.c
+++ b/usr.sbin/xntpd/lib/numtoa.c
@@ -1,4 +1,4 @@
-/* numtoa.c,v 3.1 1993/07/06 01:08:38 jbj Exp
+/*
* numtoa - return asciized network numbers store in local array space
*/
#include <stdio.h>
@@ -9,16 +9,14 @@
char *
numtoa(num)
- U_LONG num;
+ u_long num;
{
- register U_LONG netnum;
+ register u_long netnum;
register char *buf;
netnum = ntohl(num);
LIB_GETBUF(buf);
-
- (void) sprintf(buf, "%d.%d.%d.%d", (netnum>>24)&0xff,
- (netnum>>16)&0xff, (netnum>>8)&0xff, netnum&0xff);
-
+ (void) sprintf(buf, "%lu.%lu.%lu.%lu", (netnum >> 24) & 0xff,
+ (netnum >> 16) & 0xff, (netnum >> 8) & 0xff, netnum & 0xff);
return buf;
}