Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-5]: src Pullup usr.sbin string format fixes [is].
details: https://anonhg.NetBSD.org/src/rev/06f7b8f43ca6
branches: netbsd-1-5
changeset: 489799:06f7b8f43ca6
user: tv <tv%NetBSD.org@localhost>
date: Tue Oct 17 19:50:20 2000 +0000
description:
Pullup usr.sbin string format fixes [is].
See "cvs log" for explicit revision numbers per file, from sommerfeld.
diffstat:
crypto/dist/heimdal/kdc/kdc_locl.h | 11 ++++++---
crypto/dist/openssl/crypto/des/des.h | 4 +-
dist/bind/bin/named-xfer/named-xfer.c | 4 +-
dist/bind/bin/named/db_dump.c | 4 +-
dist/bind/bin/named/db_glue.c | 4 +-
dist/bind/bin/named/db_load.c | 4 +-
dist/bind/bin/named/db_update.c | 8 +++---
dist/bind/bin/named/ns_ctl.c | 5 ++-
dist/bind/bin/named/ns_forw.c | 12 +++++-----
dist/bind/bin/named/ns_func.h | 23 +++++++++++--------
dist/bind/bin/named/ns_glob.h | 13 +++-------
dist/bind/bin/named/ns_glue.c | 4 ++-
dist/bind/bin/named/ns_ixfr.c | 12 +++++-----
dist/bind/bin/named/ns_lexer.c | 9 ++++++-
dist/bind/bin/named/ns_lexer.h | 8 ++++--
dist/bind/bin/named/ns_main.c | 25 ++++++++++-----------
dist/bind/bin/named/ns_maint.c | 16 ++++++------
dist/bind/bin/named/ns_parser.y | 6 +++-
dist/bind/bin/named/ns_resp.c | 18 +++++++-------
dist/bind/bin/named/ns_stats.c | 10 ++++----
dist/bind/bin/named/ns_update.c | 21 ++++++++---------
dist/bind/bin/ndc/ndc.c | 25 ++++++++++++++------
dist/bind/include/isc/ctl.h | 5 ++-
dist/bind/include/isc/logging.h | 8 ++++--
dist/bind/lib/dst/dst_api.c | 5 +--
dist/bind/lib/dst/dst_internal.h | 4 +-
dist/bind/lib/irs/irp_p.h | 5 ++-
dist/bind/lib/isc/ev_files.c | 4 +-
dist/bind/lib/isc/ev_timers.c | 12 +++++-----
dist/bind/lib/isc/ev_waits.c | 8 +++---
dist/bind/lib/isc/eventlib.c | 14 ++++++------
dist/bind/lib/isc/eventlib_p.h | 5 ++-
dist/bind/lib/resolv/res_findzonecut.c | 9 ++++---
dist/bind/lib/resolv/res_send.c | 4 +-
dist/bind/lib/resolv/res_update.c | 5 ++-
dist/ipf/ipt.h | 8 ++++--
dist/ntp/libntp/msyslog.c | 7 +++--
dist/ntp/ntpd/ntp_io.c | 9 ++-----
dist/ntp/ntpd/refclock_true.c | 5 +++-
dist/ntp/ntpdc/ntpdc.c | 39 +++++++++++++++++++++++----------
dist/ntp/ntpq/ntpq.c | 33 ++++++++++++++++++++-------
usr.sbin/bootp/bootptest/getether.c | 6 ++--
usr.sbin/bootp/common/dovend.c | 6 ++--
usr.sbin/bootp/common/hwaddr.c | 6 ++--
usr.sbin/bootp/common/report.c | 8 +++---
usr.sbin/bootp/common/report.h | 5 ++-
usr.sbin/dhcp/client/dhclient.c | 12 +++++-----
usr.sbin/dhcp/minires/res_update.c | 5 ++-
usr.sbin/dhcp/omapip/errwarn.c | 38 ++++++++++++++++++++++++--------
usr.sbin/gspa/gspa/gsp_ass.h | 8 ++++--
usr.sbin/gspa/gspa/gspa.c | 6 ++--
usr.sbin/lpr/common_source/displayq.c | 8 +++---
usr.sbin/lpr/common_source/lp.h | 5 ++-
usr.sbin/lpr/lpd/printjob.c | 7 +++--
usr.sbin/lpr/lpd/recvjob.c | 7 +++--
usr.sbin/lpr/lpr/lpr.c | 9 ++++---
usr.sbin/map-mbone/mapper.c | 11 ++++++--
usr.sbin/mrinfo/mrinfo.c | 9 ++++---
usr.sbin/mrouted/cfparse.y | 8 ++++--
usr.sbin/mrouted/defs.h | 5 ++-
usr.sbin/mrouted/main.c | 16 ++++++++-----
usr.sbin/mrouted/prune.c | 4 +-
usr.sbin/mrouted/vif.c | 4 +-
usr.sbin/mtrace/mtrace.c | 9 ++++---
usr.sbin/mtree/create.c | 13 ++++++-----
usr.sbin/mtree/extern.h | 5 ++-
usr.sbin/pim6dd/debug.c | 4 +-
usr.sbin/pim6sd/debug.h | 5 ++-
usr.sbin/pim6sd/main.c | 4 +-
usr.sbin/pim6sd/mld6.c | 4 ++-
usr.sbin/pim6sd/mld6_proto.c | 8 +++---
usr.sbin/pkg_install/add/perform.c | 14 +++++------
usr.sbin/pkg_install/lib/file.c | 8 +++---
usr.sbin/pkg_install/lib/lib.h | 5 ++-
usr.sbin/pppd/pppd/options.c | 6 ++--
usr.sbin/pstat/pstat.c | 6 ++--
usr.sbin/rarpd/rarpd.c | 10 +++++---
usr.sbin/rbootd/utils.c | 16 ++++++------
usr.sbin/rpc.lockd/lock_proc.c | 6 ++--
usr.sbin/rwhod/rwhod.c | 4 +-
usr.sbin/sesd/srcs/sesd.c | 4 +-
usr.sbin/sup/source/log.c | 12 +++++-----
usr.sbin/sup/source/supextern.h | 32 ++++++++++++++++++---------
usr.sbin/tcpdchk/Makefile | 4 +--
usr.sbin/tcpdchk/percent_m.h | 5 ++-
usr.sbin/tcpdump/print-bootp.c | 6 ++--
usr.sbin/user/user.c | 9 +++++--
usr.sbin/ypbind/ypbind.c | 7 +++--
88 files changed, 476 insertions(+), 358 deletions(-)
diffs (truncated from 2858 to 300 lines):
diff -r 3dafeb051f2f -r 06f7b8f43ca6 crypto/dist/heimdal/kdc/kdc_locl.h
--- a/crypto/dist/heimdal/kdc/kdc_locl.h Tue Oct 17 19:50:19 2000 +0000
+++ b/crypto/dist/heimdal/kdc/kdc_locl.h Tue Oct 17 19:50:20 2000 +0000
@@ -32,7 +32,7 @@
*/
/*
- * $Id: kdc_locl.h,v 1.1.1.1.2.1 2000/08/06 21:11:07 thorpej Exp $
+ * $Id: kdc_locl.h,v 1.1.1.1.2.2 2000/10/17 19:50:32 tv Exp $
*/
#ifndef __KDC_LOCL_H__
@@ -77,9 +77,12 @@
krb5_error_code as_rep (KDC_REQ*, krb5_data*, const char*, struct sockaddr*);
void configure (int, char**);
hdb_entry* db_fetch (krb5_principal);
-void kdc_log (int, const char*, ...);
-char* kdc_log_msg (int, const char*, ...);
-char* kdc_log_msg_va (int, const char*, va_list);
+void kdc_log (int, const char*, ...)
+ __attribute__((__format__(__printf__, 2, 3)));
+char* kdc_log_msg (int, const char*, ...)
+ __attribute__((__format__(__printf__, 2, 3)));
+char* kdc_log_msg_va (int, const char*, va_list)
+ __attribute__((__format__(__printf__, 2, 0)));
void kdc_openlog (krb5_config_section*);
void loop (void);
void set_master_key (EncryptionKey);
diff -r 3dafeb051f2f -r 06f7b8f43ca6 crypto/dist/openssl/crypto/des/des.h
--- a/crypto/dist/openssl/crypto/des/des.h Tue Oct 17 19:50:19 2000 +0000
+++ b/crypto/dist/openssl/crypto/des/des.h Tue Oct 17 19:50:20 2000 +0000
@@ -69,11 +69,11 @@
#endif
#include <stdio.h>
+#include <sys/types.h>
+#define DES_LONG u_int32_t
#include <openssl/opensslconf.h> /* DES_LONG */
#include <openssl/e_os2.h> /* OPENSSL_EXTERN */
-#include <sys/types.h>
-#define DES_LONG u_int32_t
typedef unsigned char des_cblock[8];
typedef /* const */ unsigned char const_des_cblock[8];
diff -r 3dafeb051f2f -r 06f7b8f43ca6 dist/bind/bin/named-xfer/named-xfer.c
--- a/dist/bind/bin/named-xfer/named-xfer.c Tue Oct 17 19:50:19 2000 +0000
+++ b/dist/bind/bin/named-xfer/named-xfer.c Tue Oct 17 19:50:20 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: named-xfer.c,v 1.1.1.1 1999/11/20 18:54:01 veego Exp $ */
+/* $NetBSD: named-xfer.c,v 1.1.1.1.8.1 2000/10/17 19:50:38 tv Exp $ */
/*
* The original version of named-xfer by Kevin Dunlap.
@@ -1767,7 +1767,7 @@
iov[1].iov_len = msglen;
ret = writev(rfd, iov, 2);
if (ret != INT16SZ + msglen) {
- syslog(LOG_DEBUG, "writemsg(%d,%#x,%d) failed: %s",
+ syslog(LOG_DEBUG, "writemsg(%d,%p,%d) failed: %s",
rfd, msg, msglen, strerror(errno));
return (-1);
}
diff -r 3dafeb051f2f -r 06f7b8f43ca6 dist/bind/bin/named/db_dump.c
--- a/dist/bind/bin/named/db_dump.c Tue Oct 17 19:50:19 2000 +0000
+++ b/dist/bind/bin/named/db_dump.c Tue Oct 17 19:50:20 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: db_dump.c,v 1.1.1.1 1999/11/20 18:53:59 veego Exp $ */
+/* $NetBSD: db_dump.c,v 1.1.1.1.8.1 2000/10/17 19:50:33 tv Exp $ */
#if !defined(lint) && !defined(SABER)
static const char sccsid[] = "@(#)db_dump.c 4.33 (Berkeley) 3/3/91";
@@ -615,7 +615,7 @@
getname(np, dname, sizeof(dname));
when = db_lame_find(dname, dp);
if (when != 0 && when > tt.tv_sec) {
- fprintf(fp, "%sLAME=%d",
+ fprintf(fp, "%sLAME=%ld",
sep, when - tt.tv_sec);
sep = " ";
}
diff -r 3dafeb051f2f -r 06f7b8f43ca6 dist/bind/bin/named/db_glue.c
--- a/dist/bind/bin/named/db_glue.c Tue Oct 17 19:50:19 2000 +0000
+++ b/dist/bind/bin/named/db_glue.c Tue Oct 17 19:50:20 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: db_glue.c,v 1.1.1.1 1999/11/20 18:53:59 veego Exp $ */
+/* $NetBSD: db_glue.c,v 1.1.1.1.8.1 2000/10/17 19:50:33 tv Exp $ */
#if !defined(lint) && !defined(SABER)
static const char sccsid[] = "@(#)db_glue.c 4.4 (Berkeley) 6/1/90";
@@ -404,7 +404,7 @@
if ( (np->n_data && (msg = "data"))
|| (np->n_hash && (msg = "hash"))
) {
- ns_panic(ns_log_db, 1, "rm_name(%#x(%s)): non-nil %s pointer",
+ ns_panic(ns_log_db, 1, "rm_name(%p(%s)): non-nil %s pointer",
np, NAME(*np), msg);
}
diff -r 3dafeb051f2f -r 06f7b8f43ca6 dist/bind/bin/named/db_load.c
--- a/dist/bind/bin/named/db_load.c Tue Oct 17 19:50:19 2000 +0000
+++ b/dist/bind/bin/named/db_load.c Tue Oct 17 19:50:20 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: db_load.c,v 1.1.1.1 1999/11/20 18:53:59 veego Exp $ */
+/* $NetBSD: db_load.c,v 1.1.1.1.8.1 2000/10/17 19:50:33 tv Exp $ */
#if !defined(lint) && !defined(SABER)
static const char sccsid[] = "@(#)db_load.c 4.38 (Berkeley) 3/2/91";
@@ -685,7 +685,7 @@
ns_notice(ns_log_load,
"%s:%d: WARNING: new serial number < old (%lu < %lu)",
filename , lineno,
- zp->z_serial, serial);
+ (long)zp->z_serial, (long)serial);
}
if (getttl(fp, filename, lineno, &n,
&multiline) <= 0) {
diff -r 3dafeb051f2f -r 06f7b8f43ca6 dist/bind/bin/named/db_update.c
--- a/dist/bind/bin/named/db_update.c Tue Oct 17 19:50:19 2000 +0000
+++ b/dist/bind/bin/named/db_update.c Tue Oct 17 19:50:20 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: db_update.c,v 1.1.1.1 1999/11/20 18:53:59 veego Exp $ */
+/* $NetBSD: db_update.c,v 1.1.1.1.8.1 2000/10/17 19:50:33 tv Exp $ */
#if !defined(lint) && !defined(SABER)
static const char sccsid[] = "@(#)db_update.c 4.28 (Berkeley) 3/21/91";
@@ -233,7 +233,7 @@
struct databuf *tmpdp;
#endif
- ns_debug(ns_log_db, 3, "db_update(%s, %#x, %#x, %#x, 0%o, %#x)%s",
+ ns_debug(ns_log_db, 3, "db_update(%s, %p, %p, %p, 0%o, %p)%s",
name, odp, newdp, savedpp, flags, htp,
(odp && (odp->d_flags&DB_F_HINT)) ? " hint" : "");
np = nlookup(name, &htp, &fname, newdp != NULL);
@@ -327,7 +327,7 @@
fcachetab, from)
!= OK) {
ns_debug(ns_log_db, 3,
- "db_update: hint %#x freed", dp);
+ "db_update: hint %p freed", dp);
db_freedata(dp);
}
}
@@ -754,7 +754,7 @@
* response source address here if flags&NOTAUTH.
*/
fixttl(newdp);
- ns_debug(ns_log_db, 3, "db_update: adding%s %#x",
+ ns_debug(ns_log_db, 3, "db_update: adding%s %p",
(newdp->d_flags&DB_F_HINT) ? " hint":"", newdp);
if (NS_OPTION_P(OPTION_HOSTSTATS) &&
diff -r 3dafeb051f2f -r 06f7b8f43ca6 dist/bind/bin/named/ns_ctl.c
--- a/dist/bind/bin/named/ns_ctl.c Tue Oct 17 19:50:19 2000 +0000
+++ b/dist/bind/bin/named/ns_ctl.c Tue Oct 17 19:50:20 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ns_ctl.c,v 1.1.1.1 1999/11/20 18:53:59 veego Exp $ */
+/* $NetBSD: ns_ctl.c,v 1.1.1.1.8.1 2000/10/17 19:50:33 tv Exp $ */
#if !defined(lint) && !defined(SABER)
static const char rcsid[] = "Id: ns_ctl.c,v 8.28 1999/10/13 16:39:04 vixie Exp";
@@ -91,7 +91,8 @@
static void install(control);
static void install_inet(control);
static void install_unix(control);
-static void logger(enum ctl_severity, const char *fmt, ...);
+static void logger(enum ctl_severity, const char *fmt, ...)
+ __attribute__((__format__(__printf__, 2, 3)));
static void verb_connect(struct ctl_sctx *, struct ctl_sess *,
const struct ctl_verb *,
const char *, u_int, void *, void *);
diff -r 3dafeb051f2f -r 06f7b8f43ca6 dist/bind/bin/named/ns_forw.c
--- a/dist/bind/bin/named/ns_forw.c Tue Oct 17 19:50:19 2000 +0000
+++ b/dist/bind/bin/named/ns_forw.c Tue Oct 17 19:50:20 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ns_forw.c,v 1.1.1.1 1999/11/20 18:53:59 veego Exp $ */
+/* $NetBSD: ns_forw.c,v 1.1.1.1.8.1 2000/10/17 19:50:34 tv Exp $ */
#if !defined(lint) && !defined(SABER)
static const char sccsid[] = "@(#)ns_forw.c 4.32 (Berkeley) 3/3/91";
@@ -466,7 +466,7 @@
int oldn, naddr, class, found_arr, potential_ns, lame_ns;
time_t curtime;
- ns_debug(ns_log_default, 3, "nslookup(nsp=%#x, qp=%#x, \"%s\")",
+ ns_debug(ns_log_default, 3, "nslookup(nsp=%p, qp=%p, \"%s\")",
nsp, qp, syslogdname);
lame_ns = potential_ns = 0;
@@ -504,7 +504,7 @@
tmphtp = ((nsdp->d_flags & DB_F_HINT) ?fcachetab :hashtab);
np = nlookup(dname, &tmphtp, &fname, 0);
if (np == NULL) {
- ns_debug(ns_log_default, 3, "%s: not found %s %#x",
+ ns_debug(ns_log_default, 3, "%s: not found %s %p",
dname, fname, np);
found_arr = 0;
goto need_sysquery;
@@ -818,11 +818,11 @@
schedretry(struct qinfo *qp, time_t t) {
struct qinfo *qp1, *qp2;
- ns_debug(ns_log_default, 4, "schedretry(%#x, %ld sec)", qp, (long)t);
+ ns_debug(ns_log_default, 4, "schedretry(%p, %ld sec)", qp, (long)t);
if (qp->q_time)
ns_debug(ns_log_default, 4,
- "WARNING: schedretry(%#lx, %ld) q_time already %ld",
- (u_long)qp, (long)t, (long)qp->q_time);
+ "WARNING: schedretry(%p, %ld) q_time already %ld",
+ qp, (long)t, (long)qp->q_time);
gettime(&tt);
t += (u_long) tt.tv_sec;
qp->q_time = t;
diff -r 3dafeb051f2f -r 06f7b8f43ca6 dist/bind/bin/named/ns_func.h
--- a/dist/bind/bin/named/ns_func.h Tue Oct 17 19:50:19 2000 +0000
+++ b/dist/bind/bin/named/ns_func.h Tue Oct 17 19:50:20 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ns_func.h,v 1.2 1999/11/21 10:40:10 veego Exp $ */
+/* $NetBSD: ns_func.h,v 1.2.8.1 2000/10/17 19:50:34 tv Exp $ */
/*
* Copyright (c) 1985, 1990
@@ -99,17 +99,19 @@
extern struct in_addr ina_get(const u_char *data);
extern const char *sin_ntoa(struct sockaddr_in);
extern int ns_wouldlog(int category, int level);
-extern void ns_debug(int, int, const char *, ...),
- ns_info(int, const char *, ...),
- ns_notice(int, const char *, ...),
- ns_warning(int, const char *, ...),
- ns_error(int, const char *, ...),
- ns_panic(int, int, const char *, ...),
+extern void ns_debug(int, int, const char *, ...) __attribute__((__format__(__printf__, 3, 4))),
+ ns_info(int, const char *, ...) __attribute__((__format__(__printf__, 2, 3))),
+ ns_notice(int, const char *, ...) __attribute__((__format__(__printf__, 2, 3))),
+ ns_warning(int, const char *, ...) __attribute__((__format__(__printf__, 2, 3))),
+ ns_error(int, const char *, ...) __attribute__((__format__(__printf__, 2, 3))),
+ ns_panic(int, int, const char *, ...) __attribute__((__format__(__printf__, 3, 4))),
ns_assertion_failed(char *file, int line,
assertion_type type, char *cond,
int print_errno);
-extern void panic(const char *, const void *),
- gettime(struct timeval *);
+
+#define panic(a, b) ns_panic(ns_log_default, 1, a, b)
+
+extern void gettime(struct timeval *);
extern int nlabels(const char *),
my_close(int),
my_fclose(FILE *);
@@ -123,7 +125,8 @@
extern char *__savestr_record(const char *, int, char *, int);
extern u_char *ina_put(struct in_addr ina, u_char *data),
*savebuf(const u_char *, size_t, int);
-extern void dprintf(int level, const char *format, ...);
+extern void dprintf(int level, const char *format, ...)
+ __attribute__((__format__(__printf__, 2, 3)));
#ifdef DEBUG_STRINGS
extern char *debug_newstr(size_t, int, const char *, int),
*debug_savestr(const char *, int, const char *, int);
diff -r 3dafeb051f2f -r 06f7b8f43ca6 dist/bind/bin/named/ns_glob.h
--- a/dist/bind/bin/named/ns_glob.h Tue Oct 17 19:50:19 2000 +0000
+++ b/dist/bind/bin/named/ns_glob.h Tue Oct 17 19:50:20 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ns_glob.h,v 1.1.1.1 1999/11/20 18:53:59 veego Exp $ */
+/* $NetBSD: ns_glob.h,v 1.1.1.1.8.1 2000/10/17 19:50:34 tv Exp $ */
/*
* from ns.h 4.33 (Berkeley) 8/23/90
@@ -314,14 +314,9 @@
#endif
;
-DECL const char panic_msg_no_options[]
- INIT("no server_options in NS_OPTION_P");
-
-DECL const char panic_msg_insist_failed[]
- INIT("%s:%d: insist '%s' failed: %s");
-
-DECL const char panic_msg_bad_which[]
- INIT("%s:%d: INCRSTATS(%s): bad \"which\"");
+#define panic_msg_no_options "no server_options in NS_OPTION_P"
+#define panic_msg_insist_failed "%s:%d: insist '%s' failed: %s"
+#define panic_msg_bad_which "%s:%d: INCRSTATS(%s): bad \"which\""
DECL u_long globalStats[nssLast];
diff -r 3dafeb051f2f -r 06f7b8f43ca6 dist/bind/bin/named/ns_glue.c
--- a/dist/bind/bin/named/ns_glue.c Tue Oct 17 19:50:19 2000 +0000
+++ b/dist/bind/bin/named/ns_glue.c Tue Oct 17 19:50:20 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ns_glue.c,v 1.1.1.1 1999/11/20 18:53:59 veego Exp $ */
+/* $NetBSD: ns_glue.c,v 1.1.1.1.8.1 2000/10/17 19:50:34 tv Exp $ */
#if !defined(lint) && !defined(SABER)
static const char rcsid[] = "Id: ns_glue.c,v 8.14 1999/10/19 02:06:26 gson Exp";
@@ -181,6 +181,7 @@
(print_errno) ? strerror(errno) : "");
}
Home |
Main Index |
Thread Index |
Old Index