From 41dc2c91bdf2a3de084dfc49a8827c22ee903055 Mon Sep 17 00:00:00 2001 From: kleink Date: Thu, 11 Jun 1998 14:50:46 +0000 Subject: [PATCH] Fix LP64 botches introduced in last commit. --- usr.sbin/ypserv/mknetid/mknetid.c | 24 ++++++++++++++---------- usr.sbin/ypserv/stdethers/stdethers.c | 9 +++++---- usr.sbin/ypserv/stdhosts/stdhosts.c | 9 +++++---- 3 files changed, 24 insertions(+), 18 deletions(-) diff --git a/usr.sbin/ypserv/mknetid/mknetid.c b/usr.sbin/ypserv/mknetid/mknetid.c index 7cc0f939ebfe..832e21d60fb6 100644 --- a/usr.sbin/ypserv/mknetid/mknetid.c +++ b/usr.sbin/ypserv/mknetid/mknetid.c @@ -1,4 +1,4 @@ -/* $NetBSD: mknetid.c,v 1.8 1998/06/08 06:53:48 lukem Exp $ */ +/* $NetBSD: mknetid.c,v 1.9 1998/06/11 14:50:46 kleink Exp $ */ /* * Copyright (c) 1996 Mats O Jansson @@ -33,7 +33,7 @@ #include #ifndef lint -__RCSID("$NetBSD: mknetid.c,v 1.8 1998/06/08 06:53:48 lukem Exp $"); +__RCSID("$NetBSD: mknetid.c,v 1.9 1998/06/11 14:50:46 kleink Exp $"); #endif /* @@ -229,7 +229,8 @@ read_passwd(fname) const char *fname; { FILE *pfile; - int line_no, colon; + size_t line_no; + int colon; size_t len; char *p, *k, *u, *g; @@ -241,7 +242,8 @@ read_passwd(fname) (p = fparseln(pfile, &len, &line_no, NULL, FPARSELN_UNESCALL)); free(p)) { if (len == 0) { - warnx("%s line %d: empty line", fname, line_no); + warnx("%s line %lu: empty line", fname, + (unsigned long)line_no); continue; } @@ -250,8 +252,8 @@ read_passwd(fname) colon++; if (colon != 6) { - warnx("%s line %d: incorrect number of fields", - fname, line_no); + warnx("%s line %lu: incorrect number of fields", + fname, (unsigned long)line_no); continue; } @@ -303,7 +305,8 @@ read_group(fname) const char *fname; { FILE *gfile; - int line_no, colon; + size_t line_no; + int colon; size_t len; char *p, *k, *u, *g; @@ -315,7 +318,8 @@ read_group(fname) (p = fparseln(gfile, &len, &line_no, NULL, FPARSELN_UNESCALL)); free(p)) { if (len == 0) { - warnx("%s line %d: empty line", fname, line_no); + warnx("%s line %lu: empty line", fname, + (unsigned long)line_no); continue; } @@ -324,8 +328,8 @@ read_group(fname) colon++; if (colon != 3) { - warnx("%s line %d: incorrect number of fields", - fname, line_no); + warnx("%s line %lu: incorrect number of fields", + fname, (unsigned long)line_no); continue; } diff --git a/usr.sbin/ypserv/stdethers/stdethers.c b/usr.sbin/ypserv/stdethers/stdethers.c index 5759fe8cdff5..3ef880b98d81 100644 --- a/usr.sbin/ypserv/stdethers/stdethers.c +++ b/usr.sbin/ypserv/stdethers/stdethers.c @@ -1,4 +1,4 @@ -/* $NetBSD: stdethers.c,v 1.10 1998/06/08 06:53:49 lukem Exp $ */ +/* $NetBSD: stdethers.c,v 1.11 1998/06/11 14:50:47 kleink Exp $ */ /* * Copyright (c) 1995 Mats O Jansson @@ -33,7 +33,7 @@ #include #ifndef lint -__RCSID("$NetBSD: stdethers.c,v 1.10 1998/06/08 06:53:49 lukem Exp $"); +__RCSID("$NetBSD: stdethers.c,v 1.11 1998/06/11 14:50:47 kleink Exp $"); #endif #include @@ -65,7 +65,7 @@ main(argc, argv) { struct ether_addr eth_addr; FILE *data_file; - int line_no; + size_t line_no; size_t len; char *fname, *p, *h; char hostname[MAXHOSTNAMELEN + 1]; @@ -97,7 +97,8 @@ main(argc, argv) if (ether_line(p, ð_addr, hostname) == 0) printf("%s\t%s\n", ether_ntoa(ð_addr), hostname); else - warnx("ignoring line %d: `%s'", line_no, p); + warnx("ignoring line %lu: `%s'", + (unsigned long)line_no, p); } exit(0); diff --git a/usr.sbin/ypserv/stdhosts/stdhosts.c b/usr.sbin/ypserv/stdhosts/stdhosts.c index 68aeadeec146..bd1884eeec9a 100644 --- a/usr.sbin/ypserv/stdhosts/stdhosts.c +++ b/usr.sbin/ypserv/stdhosts/stdhosts.c @@ -1,4 +1,4 @@ -/* $NetBSD: stdhosts.c,v 1.8 1998/06/08 06:53:49 lukem Exp $ */ +/* $NetBSD: stdhosts.c,v 1.9 1998/06/11 14:50:47 kleink Exp $ */ /* * Copyright (c) 1994 Mats O Jansson @@ -33,7 +33,7 @@ #include #ifndef lint -__RCSID("$NetBSD: stdhosts.c,v 1.8 1998/06/08 06:53:49 lukem Exp $"); +__RCSID("$NetBSD: stdhosts.c,v 1.9 1998/06/11 14:50:47 kleink Exp $"); #endif #include @@ -62,7 +62,7 @@ main(argc, argv) { struct in_addr host_addr; FILE *data_file; - int line_no; + size_t line_no; size_t len; char *k, *v, *addr_string, *fname; @@ -99,7 +99,8 @@ main(argc, argv) if (inet_aton(k, &host_addr) == 0 || (addr_string = inet_ntoa(host_addr)) == NULL) - warnx("%s line %d: syntax error", fname, line_no); + warnx("%s line %lu: syntax error", fname, + (unsigned long)line_no); printf("%s %s\n", addr_string, v); }