Format string cleanups by Bill Sommerfeld.

This commit is contained in:
is 2000-10-08 20:03:12 +00:00
parent 8a1fd03ca4
commit 7f029e5684
13 changed files with 47 additions and 41 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: ctl.h,v 1.1.1.1 1999/11/20 18:54:03 veego Exp $ */
/* $NetBSD: ctl.h,v 1.2 2000/10/08 20:03:12 is Exp $ */
#ifndef ISC_CTL_H
#define ISC_CTL_H
@ -64,7 +64,8 @@ struct ctl_verb {
#define ctl_logger __ctl_logger
void ctl_logger(enum ctl_severity, const char *, ...);
void ctl_logger(enum ctl_severity, const char *, ...)
__attribute__((__format__(__printf__, 2, 3)));
/* Client symbols. */

View File

@ -1,4 +1,4 @@
/* $NetBSD: logging.h,v 1.1.1.1 1999/11/20 18:54:03 veego Exp $ */
/* $NetBSD: logging.h,v 1.2 2000/10/08 20:03:12 is Exp $ */
/*
* Copyright (c) 1996-1999 by Internet Software Consortium.
@ -79,8 +79,10 @@ char * log_get_filename(log_channel);
int log_check_channel(log_context, int, log_channel);
int log_check(log_context, int, int);
void log_vwrite(log_context, int, int, const char *,
va_list args);
void log_write(log_context, int, int, const char *, ...);
va_list args)
__attribute__((__format__(__printf__, 4, 0)));
void log_write(log_context, int, int, const char *, ...)
__attribute__((__format__(__printf__, 4, 5)));
int log_new_context(int, char **, log_context *);
void log_free_context(log_context);
int log_add_channel(log_context, int, log_channel);

View File

@ -1,7 +1,7 @@
/* $NetBSD: dst_api.c,v 1.1.1.1 1999/11/20 18:54:06 veego Exp $ */
/* $NetBSD: dst_api.c,v 1.2 2000/10/08 20:03:12 is Exp $ */
#ifndef LINT
static const char rcsid[] = "$Header: /cvsroot/src/dist/bind/lib/dst/Attic/dst_api.c,v 1.1.1.1 1999/11/20 18:54:06 veego Exp $";
static const char rcsid[] = "$Header: /cvsroot/src/dist/bind/lib/dst/Attic/dst_api.c,v 1.2 2000/10/08 20:03:12 is Exp $";
#endif
/*
@ -64,7 +64,6 @@ static const char rcsid[] = "$Header: /cvsroot/src/dist/bind/lib/dst/Attic/dst_a
/* static variables */
static int done_init = 0;
dst_func *dst_t_func[DST_MAX_ALGS];
char *key_file_fmt_str = "Private-key-format: v%s\nAlgorithm: %d (%s)\n";
char *dst_path = "";
/* internal I/O functions */

View File

@ -1,4 +1,4 @@
/* $NetBSD: dst_internal.h,v 1.1.1.1 1999/11/20 18:54:07 veego Exp $ */
/* $NetBSD: dst_internal.h,v 1.2 2000/10/08 20:03:12 is Exp $ */
#ifndef DST_INTERNAL_H
#define DST_INTERNAL_H
@ -100,7 +100,7 @@ typedef struct dst_func {
} dst_func;
extern dst_func *dst_t_func[DST_MAX_ALGS];
extern char *key_file_fmt_str;
static const char key_file_fmt_str[] = "Private-key-format: v%s\nAlgorithm: %d (%s)\n";
extern char *dst_path;
#ifndef DST_HASH_SIZE

View File

@ -1,4 +1,4 @@
/* $NetBSD: irp_p.h,v 1.1.1.1 1999/11/20 18:54:08 veego Exp $ */
/* $NetBSD: irp_p.h,v 1.2 2000/10/08 20:03:13 is Exp $ */
/*
* Copyright (c) 1996 by Internet Software Consortium.
@ -55,7 +55,8 @@ char *irs_irp_read_body(struct irp_p *pvt, size_t *size);
int irs_irp_get_full_response(struct irp_p *pvt, int *code,
char *text, size_t textlen,
char **body, size_t *bodylen);
int irs_irp_send_command(struct irp_p *pvt, const char *fmt, ...);
int irs_irp_send_command(struct irp_p *pvt, const char *fmt, ...)
__attribute__((__format__(__printf__, 2, 3)));
extern int irp_log_errors;

View File

@ -1,4 +1,4 @@
/* $NetBSD: ev_files.c,v 1.1.1.1 1999/11/20 18:54:11 veego Exp $ */
/* $NetBSD: ev_files.c,v 1.2 2000/10/08 20:03:13 is Exp $ */
/*
* Copyright (c) 1995-1999 by Internet Software Consortium
@ -55,7 +55,7 @@ evSelectFD(evContext opaqueCtx,
int mode;
evPrintf(ctx, 1,
"evSelectFD(ctx %#x, fd %d, mask 0x%x, func %#x, uap %#x)\n",
"evSelectFD(ctx %p, fd %d, mask 0x%x, func %p, uap %p)\n",
ctx, fd, eventmask, func, uap);
if (eventmask == 0 || (eventmask & ~EV_MASK_ALL) != 0)
ERR(EINVAL);

View File

@ -1,4 +1,4 @@
/* $NetBSD: ev_timers.c,v 1.1.1.1 1999/11/20 18:54:11 veego Exp $ */
/* $NetBSD: ev_timers.c,v 1.2 2000/10/08 20:03:13 is Exp $ */
/*
* Copyright (c) 1995-1999 by Internet Software Consortium
@ -152,10 +152,10 @@ evSetTimer(evContext opaqueCtx,
evTimer *id;
evPrintf(ctx, 1,
"evSetTimer(ctx %#x, func %#x, uap %#x, due %d.%09ld, inter %d.%09ld)\n",
"evSetTimer(ctx %p, func %p, uap %p, due %d.%09ld, inter %d.%09ld)\n",
ctx, func, uap,
due.tv_sec, due.tv_nsec,
inter.tv_sec, inter.tv_nsec);
(int)due.tv_sec, due.tv_nsec,
(int)inter.tv_sec, inter.tv_nsec);
/* due={0,0} is a magic cookie meaning "now." */
if (due.tv_sec == 0 && due.tv_nsec == 0L)
@ -375,8 +375,8 @@ print_timer(void *what, void *uap) {
evPrintf(ctx, 7,
" func %p, uap %p, due %d.%09ld, inter %d.%09ld\n",
cur->func, cur->uap,
cur->due.tv_sec, cur->due.tv_nsec,
cur->inter.tv_sec, cur->inter.tv_nsec);
(int)cur->due.tv_sec, cur->due.tv_nsec,
(int)cur->inter.tv_sec, cur->inter.tv_nsec);
}
static void

View File

@ -1,4 +1,4 @@
/* $NetBSD: ev_waits.c,v 1.1.1.1 1999/11/20 18:54:11 veego Exp $ */
/* $NetBSD: ev_waits.c,v 1.2 2000/10/08 20:03:13 is Exp $ */
/*
* Copyright (c) 1996-1999 by Internet Software Consortium
@ -193,14 +193,14 @@ print_waits(evContext_p *ctx) {
evPrintf(ctx, 9, "wait waiting:\n");
for (wl = ctx->waitLists; wl != NULL; wl = wl->next) {
INSIST(wl->first != NULL);
evPrintf(ctx, 9, " tag %#x:", wl->first->tag);
evPrintf(ctx, 9, " tag %p:", wl->first->tag);
for (this = wl->first; this != NULL; this = this->next)
evPrintf(ctx, 9, " %#x", this);
evPrintf(ctx, 9, " %p", this);
evPrintf(ctx, 9, "\n");
}
evPrintf(ctx, 9, "wait done:");
for (this = ctx->waitDone.first; this != NULL; this = this->next)
evPrintf(ctx, 9, " %#x", this);
evPrintf(ctx, 9, " %p", this);
evPrintf(ctx, 9, "\n");
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: eventlib.c,v 1.1.1.1 1999/11/20 18:54:11 veego Exp $ */
/* $NetBSD: eventlib.c,v 1.2 2000/10/08 20:03:13 is Exp $ */
/*
* Copyright (c) 1995-1999 by Internet Software Consortium
@ -298,7 +298,7 @@ evGetNext(evContext opaqueCtx, evEvent *opaqueEv, int options) {
(u_long)ctx->rdLast.fds_bits[0],
(u_long)ctx->wrLast.fds_bits[0],
(u_long)ctx->exLast.fds_bits[0],
tp ? tp->tv_sec : -1,
tp ? (int)tp->tv_sec : -1,
tp ? tp->tv_nsec : -1);
/* XXX should predict system's earliness and adjust. */
@ -464,7 +464,7 @@ evDispatch(evContext opaqueCtx, evEvent opaqueEv) {
evAccept *this = ev->u.accept.this;
evPrintf(ctx, 5,
"Dispatch.Accept: fd %d -> %d, func %#x, uap %#x\n",
"Dispatch.Accept: fd %d -> %d, func %p, uap %p\n",
this->conn->fd, this->fd,
this->conn->func, this->conn->uap);
errno = this->ioErrno;
@ -481,7 +481,7 @@ evDispatch(evContext opaqueCtx, evEvent opaqueEv) {
int eventmask = ev->u.file.eventmask;
evPrintf(ctx, 5,
"Dispatch.File: fd %d, mask 0x%x, func %#x, uap %#x\n",
"Dispatch.File: fd %d, mask 0x%x, func %p, uap %p\n",
this->fd, this->eventmask, this->func, this->uap);
(this->func)(opaqueCtx, this->uap, this->fd, eventmask);
#ifdef EVENTLIB_TIME_CHECKS
@ -493,7 +493,7 @@ evDispatch(evContext opaqueCtx, evEvent opaqueEv) {
evStream *this = ev->u.stream.this;
evPrintf(ctx, 5,
"Dispatch.Stream: fd %d, func %#x, uap %#x\n",
"Dispatch.Stream: fd %d, func %p, uap %p\n",
this->fd, this->func, this->uap);
errno = this->ioErrno;
(this->func)(opaqueCtx, this->uap, this->fd, this->ioDone);
@ -505,7 +505,7 @@ evDispatch(evContext opaqueCtx, evEvent opaqueEv) {
case Timer: {
evTimer *this = ev->u.timer.this;
evPrintf(ctx, 5, "Dispatch.Timer: func %#x, uap %#x\n",
evPrintf(ctx, 5, "Dispatch.Timer: func %p, uap %p\n",
this->func, this->uap);
(this->func)(opaqueCtx, this->uap, this->due, this->inter);
#ifdef EVENTLIB_TIME_CHECKS
@ -517,7 +517,7 @@ evDispatch(evContext opaqueCtx, evEvent opaqueEv) {
evWait *this = ev->u.wait.this;
evPrintf(ctx, 5,
"Dispatch.Wait: tag %#x, func %#x, uap %#x\n",
"Dispatch.Wait: tag %p, func %p, uap %p\n",
this->tag, this->func, this->uap);
(this->func)(opaqueCtx, this->uap, this->tag);
#ifdef EVENTLIB_TIME_CHECKS

View File

@ -1,4 +1,4 @@
/* $NetBSD: eventlib_p.h,v 1.1.1.1 1999/11/20 18:54:11 veego Exp $ */
/* $NetBSD: eventlib_p.h,v 1.2 2000/10/08 20:03:13 is Exp $ */
/*
* Copyright (c) 1995-1999 by Internet Software Consortium
@ -186,7 +186,8 @@ typedef struct {
/* eventlib.c */
#define evPrintf __evPrintf
void evPrintf(const evContext_p *ctx, int level, const char *fmt, ...);
void evPrintf(const evContext_p *ctx, int level, const char *fmt, ...)
__attribute__((__format__(__printf__, 3, 4)));
/* ev_timers.c */
#define evCreateTimers __evCreateTimers

View File

@ -1,4 +1,4 @@
/* $NetBSD: res_findzonecut.c,v 1.1.1.1 1999/11/20 18:54:12 veego Exp $ */
/* $NetBSD: res_findzonecut.c,v 1.2 2000/10/08 20:03:13 is Exp $ */
#if !defined(lint) && !defined(SABER)
static const char rcsid[] = "Id: res_findzonecut.c,v 8.8 1999/10/15 19:49:11 vixie Exp";
@ -80,7 +80,8 @@ static void free_nsrr(rrset_ns *, rr_ns *);
static rr_ns * find_ns(rrset_ns *, const char *);
static int do_query(res_state, const char *, ns_class, ns_type,
u_char *, ns_msg *);
static void dprintf(const char *, ...);
static void dprintf(const char *, ...)
__attribute__((__format__(__printf__, 1, 2)));
/* Macros. */
@ -371,7 +372,7 @@ get_ns(res_state statp, const char *zname, ns_class class, rrset_ns *nsrrsp) {
/* Go and get the NS RRs for this zone. */
n = do_query(statp, zname, class, ns_t_ns, resp, &msg);
if (n != 0) {
DPRINTF(("get_ns: do_query('zname', %s) failed (%d)",
DPRINTF(("get_ns: do_query('%s', %s) failed (%d)",
zname, p_class(class), n));
return (-1);
}
@ -403,7 +404,7 @@ get_glue(res_state statp, ns_class class, rrset_ns *nsrrsp) {
resp, &msg);
if (n != 0) {
DPRINTF(("get_glue: do_query('%s', %s') failed",
nsrr->name, p_class(class), n));
nsrr->name, p_class(class)));
return (-1);
}
if (save_a(statp, &msg, ns_s_an, nsrr->name, class,

View File

@ -1,4 +1,4 @@
/* $NetBSD: res_send.c,v 1.1.1.1 1999/11/20 18:54:12 veego Exp $ */
/* $NetBSD: res_send.c,v 1.2 2000/10/08 20:03:13 is Exp $ */
/*
* Copyright (c) 1985, 1989, 1993
@ -782,7 +782,7 @@ res_nsend(res_state statp,
(stdout, ";; got answer:\n"));
DprintQ((statp->options & RES_DEBUG) ||
(statp->pfcode & RES_PRF_REPLY),
(stdout, ""),
(stdout, "%s", ""),
ans, (resplen>anssiz)?anssiz:resplen);
/*
* If using virtual circuits, we assume that the first server

View File

@ -1,4 +1,4 @@
/* $NetBSD: res_update.c,v 1.1.1.1 1999/11/20 18:54:12 veego Exp $ */
/* $NetBSD: res_update.c,v 1.2 2000/10/08 20:03:13 is Exp $ */
#if !defined(lint) && !defined(SABER)
static const char rcsid[] = "Id: res_update.c,v 1.24 1999/10/15 19:49:12 vixie Exp";
@ -80,7 +80,8 @@ struct zonegrp {
static int nscopy(struct sockaddr_in *, const struct sockaddr_in *, int);
static int nsprom(struct sockaddr_in *, const struct in_addr *, int);
static void dprintf(const char *, ...);
static void dprintf(const char *, ...)
__attribute__((__format__(__printf__, 1, 2)));
/* Macros. */