More format string cleanups by sommerfeld.

This commit is contained in:
is 2000-10-11 20:23:46 +00:00
parent 7f3f19a068
commit d8302e2d73
55 changed files with 266 additions and 209 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: hlfsd.c,v 1.8 1999/09/04 22:38:18 christos Exp $ */ /* $NetBSD: hlfsd.c,v 1.9 2000/10/11 20:23:46 is Exp $ */
/* /*
* Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1997-1999 Erez Zadok
@ -949,7 +949,7 @@ fatal(char *mess)
#endif #endif
} }
} }
plog(XLOG_FATAL, mess); plog(XLOG_FATAL, "%s", mess);
hlfsd_going_down(1); hlfsd_going_down(1);
} }

View File

@ -1,4 +1,4 @@
/* $NetBSD: am_utils.h,v 1.8 1999/09/04 22:38:19 christos Exp $ */ /* $NetBSD: am_utils.h,v 1.9 2000/10/11 20:23:47 is Exp $ */
/* /*
* Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1997-1999 Erez Zadok
@ -645,7 +645,7 @@ extern void nfs_program_2(struct svc_req *rqstp, SVCXPRT *transp);
extern void normalize_slash(char *); extern void normalize_slash(char *);
extern void ops_showamfstypes(char *buf); extern void ops_showamfstypes(char *buf);
extern void ops_showfstypes(char *outbuf); extern void ops_showfstypes(char *outbuf);
extern void plog(int, char *,...) extern void plog(int, const char *,...)
__attribute__ ((__format__ (__printf__, 2, 3))); __attribute__ ((__format__ (__printf__, 2, 3)));
extern void rem_que(qelem *); extern void rem_que(qelem *);
extern void reschedule_timeout_mp(void); extern void reschedule_timeout_mp(void);
@ -967,7 +967,7 @@ extern void print_nfs_args(const nfs_args_t *nap, u_long nfs_version);
extern int debug_flags; /* Debug options */ extern int debug_flags; /* Debug options */
extern int debug_option (char *opt); extern int debug_option (char *opt);
extern struct opt_tab dbg_opt[]; extern struct opt_tab dbg_opt[];
extern void dplog(char *fmt, ...) extern void dplog(const char *fmt, ...)
__attribute__ ((__format__ (__printf__, 1, 2))); __attribute__ ((__format__ (__printf__, 1, 2)));
/**************************************************************************/ /**************************************************************************/

View File

@ -1,4 +1,4 @@
/* $NetBSD: mount_fs.c,v 1.1.1.7 1999/09/04 22:24:56 christos Exp $ */ /* $NetBSD: mount_fs.c,v 1.2 2000/10/11 20:23:48 is Exp $ */
/* /*
* Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1997-1999 Erez Zadok
@ -176,14 +176,10 @@ mount_fs(mntent_t *mnt, int flags, caddr_t mnt_data, int retry, MTYPE_TYPE type,
char optsbuf[48]; char optsbuf[48];
# endif /* defined(MNTTAB_OPT_DEV) || (defined(HAVE_FS_NFS3) && defined(MNTTAB_OPT_VERS)) || defined(MNTTAB_OPT_PROTO) */ # endif /* defined(MNTTAB_OPT_DEV) || (defined(HAVE_FS_NFS3) && defined(MNTTAB_OPT_VERS)) || defined(MNTTAB_OPT_PROTO) */
#endif /* MOUNT_TABLE_ON_FILE */ #endif /* MOUNT_TABLE_ON_FILE */
#ifdef DEBUG
char buf[80]; /* buffer for sprintf */
#endif /* DEBUG */
#ifdef DEBUG #ifdef DEBUG
sprintf(buf, "%s%s%s", dlog("%s fstype " MTYPE_PRINTF_TYPE " (%s) flags %#x (%s)",
"%s fstype ", MTYPE_PRINTF_TYPE, " (%s) flags %#x (%s)"); mnt->mnt_dir, type, mnt->mnt_type, flags, mnt->mnt_opts);
dlog(buf, mnt->mnt_dir, type, mnt->mnt_type, flags, mnt->mnt_opts);
#endif /* DEBUG */ #endif /* DEBUG */
again: again:

View File

@ -1,4 +1,4 @@
/* $NetBSD: xutil.c,v 1.6 2000/07/04 20:27:35 matt Exp $ */ /* $NetBSD: xutil.c,v 1.7 2000/10/11 20:23:48 is Exp $ */
/* /*
* Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1997-1999 Erez Zadok
@ -82,7 +82,8 @@ static int orig_mem_bytes;
#endif /* DEBUG_MEM */ #endif /* DEBUG_MEM */
/* forward definitions */ /* forward definitions */
static void real_plog(int lvl, char *fmt, va_list vargs); static void real_plog(int lvl, const char *fmt, va_list vargs)
__attribute__((__format__(__printf__, 2, 0)));
#ifdef DEBUG #ifdef DEBUG
/* /*
@ -283,12 +284,13 @@ checkup_mem(void)
* 'e' never gets longer than maxlen characters. * 'e' never gets longer than maxlen characters.
*/ */
static void static void
expand_error(char *f, char *e, int maxlen) expand_error(const char *f, char *e, int maxlen)
{ {
#ifndef HAVE_STRERROR #ifndef HAVE_STRERROR
extern int sys_nerr; extern int sys_nerr;
#endif #endif
char *p, *q; const char *p;
char *q;
int error = errno; int error = errno;
int len = 0; int len = 0;
@ -380,7 +382,7 @@ debug_option(char *opt)
void void
dplog(char *fmt, ...) dplog(const char *fmt, ...)
{ {
va_list ap; va_list ap;
@ -395,7 +397,7 @@ dplog(char *fmt, ...)
void void
plog(int lvl, char *fmt, ...) plog(int lvl, const char *fmt, ...)
{ {
va_list ap; va_list ap;
@ -409,7 +411,7 @@ plog(int lvl, char *fmt, ...)
static void static void
real_plog(int lvl, char *fmt, va_list vargs) real_plog(int lvl, const char *fmt, va_list vargs)
{ {
char msg[1024]; char msg[1024];
char efmt[1024]; char efmt[1024];
@ -432,7 +434,8 @@ real_plog(int lvl, char *fmt, va_list vargs)
* to 1023 (including the '\0'). * to 1023 (including the '\0').
* *
*/ */
vsnprintf(ptr, 1023, efmt, vargs); fmt = efmt;
vsnprintf(ptr, 1023, fmt, vargs);
msg[1022] = '\0'; /* null terminate, to be sure */ msg[1022] = '\0'; /* null terminate, to be sure */
ptr += strlen(ptr); ptr += strlen(ptr);

View File

@ -1,4 +1,4 @@
/* $NetBSD: arp.c,v 1.25 2000/09/28 01:11:31 erh Exp $ */ /* $NetBSD: arp.c,v 1.26 2000/10/11 20:23:48 is Exp $ */
/* /*
* Copyright (c) 1984, 1993 * Copyright (c) 1984, 1993
@ -46,7 +46,7 @@ __COPYRIGHT("@(#) Copyright (c) 1984, 1993\n\
#if 0 #if 0
static char sccsid[] = "@(#)arp.c 8.3 (Berkeley) 4/28/95"; static char sccsid[] = "@(#)arp.c 8.3 (Berkeley) 4/28/95";
#else #else
__RCSID("$NetBSD: arp.c,v 1.25 2000/09/28 01:11:31 erh Exp $"); __RCSID("$NetBSD: arp.c,v 1.26 2000/10/11 20:23:48 is Exp $");
#endif #endif
#endif /* not lint */ #endif /* not lint */
@ -454,18 +454,14 @@ sdl_print(sdl)
{ {
int i; int i;
u_int8_t *p; u_int8_t *p;
const char *hexfmt = "%x";
if (sdl->sdl_type == IFT_ETHER || sdl->sdl_type == IFT_FDDI)
hexfmt = "%02x";
i = sdl->sdl_alen; i = sdl->sdl_alen;
p = LLADDR(sdl); p = LLADDR(sdl);
(void)printf(hexfmt, *p); (void)printf("%02x", *p);
while (--i > 0) { while (--i > 0) {
putchar(':'); putchar(':');
(void)printf(hexfmt, *++p); (void)printf("%02x", *++p);
} }
} }

View File

@ -1,7 +1,7 @@
# $NetBSD: Makefile.inc,v 1.6 2000/03/01 10:50:01 itojun Exp $ # $NetBSD: Makefile.inc,v 1.7 2000/10/11 20:23:48 is Exp $
WARNS=0 WARNS=0
WFORMAT=2
BIND_DIR= ${.CURDIR}/.. BIND_DIR= ${.CURDIR}/..
BIND_DIST_DIR= ${.CURDIR}/../../../dist/bind BIND_DIST_DIR= ${.CURDIR}/../../../dist/bind

View File

@ -22,7 +22,7 @@ SOFTWARE.
#include <sys/cdefs.h> #include <sys/cdefs.h>
#ifndef lint #ifndef lint
__RCSID("$NetBSD: bootpd.c,v 1.12 1999/01/31 19:12:27 briggs Exp $"); __RCSID("$NetBSD: bootpd.c,v 1.13 2000/10/11 20:23:48 is Exp $");
#endif #endif
/* /*
@ -1242,7 +1242,7 @@ dovend_rfc1048(bp, hp, bootsize)
int bytesleft, len; int bytesleft, len;
byte *vp; byte *vp;
static char noroom[] = "%s: No room for \"%s\" option"; static const char noroom[] = "%s: No room for \"%s\" option";
vp = bp->bp_vend; vp = bp->bp_vend;

View File

@ -1,8 +1,8 @@
/* $NetBSD: getether.c,v 1.3 1998/03/14 04:39:54 lukem Exp $ */ /* $NetBSD: getether.c,v 1.4 2000/10/11 20:23:49 is Exp $ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
#ifndef lint #ifndef lint
__RCSID("$NetBSD: getether.c,v 1.3 1998/03/14 04:39:54 lukem Exp $"); __RCSID("$NetBSD: getether.c,v 1.4 2000/10/11 20:23:49 is Exp $");
#endif #endif
/* /*
@ -149,7 +149,7 @@ getether(ifname, eap)
ifc.ifc_buf = (caddr_t) ibuf; ifc.ifc_buf = (caddr_t) ibuf;
if (ioctl(fd, SIOCGIFCONF, (char *) &ifc) < 0 || if (ioctl(fd, SIOCGIFCONF, (char *) &ifc) < 0 ||
ifc.ifc_len < sizeof(struct ifreq)) { ifc.ifc_len < sizeof(struct ifreq)) {
report(LOG_ERR, "getether: SIOCGIFCONF: %s", get_errmsg); report(LOG_ERR, "getether: SIOCGIFCONF: %s", get_errmsg());
goto out; goto out;
} }
/* Search interface configuration list for link layer address. */ /* Search interface configuration list for link layer address. */

View File

@ -1,8 +1,8 @@
/* $NetBSD: dovend.c,v 1.3 1998/03/14 04:39:54 lukem Exp $ */ /* $NetBSD: dovend.c,v 1.4 2000/10/11 20:23:49 is Exp $ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
#ifndef lint #ifndef lint
__RCSID("$NetBSD: dovend.c,v 1.3 1998/03/14 04:39:54 lukem Exp $"); __RCSID("$NetBSD: dovend.c,v 1.4 2000/10/11 20:23:49 is Exp $");
#endif #endif
/* /*
@ -67,7 +67,7 @@ dovend_rfc1497(hp, buf, len)
char *tmpstr; char *tmpstr;
#endif #endif
static char noroom[] = "%s: No room for \"%s\" option"; static const char noroom[] = "%s: No room for \"%s\" option";
#define NEED(LEN, MSG) do \ #define NEED(LEN, MSG) do \
if (bytesleft < (LEN)) { \ if (bytesleft < (LEN)) { \
report(LOG_NOTICE, noroom, \ report(LOG_NOTICE, noroom, \

View File

@ -1,8 +1,8 @@
/* $NetBSD: hwaddr.c,v 1.4 1998/03/14 04:39:54 lukem Exp $ */ /* $NetBSD: hwaddr.c,v 1.5 2000/10/11 20:23:49 is Exp $ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
#ifndef lint #ifndef lint
__RCSID("$NetBSD: hwaddr.c,v 1.4 1998/03/14 04:39:54 lukem Exp $"); __RCSID("$NetBSD: hwaddr.c,v 1.5 2000/10/11 20:23:49 is Exp $");
#endif #endif
/* /*
@ -144,7 +144,7 @@ setarp(s, ia, ha, len)
sprintf(buf, "arp -d %s; arp -s %s %s temp", sprintf(buf, "arp -d %s; arp -s %s %s temp",
a, a, haddrtoa(ha, len)); a, a, haddrtoa(ha, len));
if (debug > 2) if (debug > 2)
report(LOG_INFO, buf); report(LOG_INFO, "%s", buf);
status = system(buf); status = system(buf);
if (status) if (status)
report(LOG_ERR, "arp failed, exit code=0x%x", status); report(LOG_ERR, "arp failed, exit code=0x%x", status);

View File

@ -1,8 +1,8 @@
/* $NetBSD: report.c,v 1.4 1998/07/26 15:33:34 mycroft Exp $ */ /* $NetBSD: report.c,v 1.5 2000/10/11 20:23:49 is Exp $ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
#ifndef lint #ifndef lint
__RCSID("$NetBSD: report.c,v 1.4 1998/07/26 15:33:34 mycroft Exp $"); __RCSID("$NetBSD: report.c,v 1.5 2000/10/11 20:23:49 is Exp $");
#endif #endif
/* /*
@ -98,13 +98,13 @@ static int numlevels = sizeof(levelnames) / sizeof(levelnames[0]);
*/ */
#ifdef __STDC__ #ifdef __STDC__
void void
report(int priority, char *fmt,...) report(int priority, const char *fmt,...)
#else #else
/*VARARGS2*/ /*VARARGS2*/
void void
report(priority, fmt, va_alist) report(priority, fmt, va_alist)
int priority; int priority;
char *fmt; const char *fmt;
va_dcl va_dcl
#endif #endif
{ {

View File

@ -1,4 +1,4 @@
/* $NetBSD: report.h,v 1.3 1998/07/26 15:33:34 mycroft Exp $ */ /* $NetBSD: report.h,v 1.4 2000/10/11 20:23:49 is Exp $ */
/* report.h */ /* report.h */
@ -9,7 +9,8 @@
#endif #endif
extern void report_init P((int nolog)); extern void report_init P((int nolog));
extern void report P((int, char *, ...)); extern void report P((int, const char *, ...))
__attribute__((__format__(__printf__, 2, 3)));
extern const char *get_errmsg P((void)); extern const char *get_errmsg P((void));
#undef P #undef P

View File

@ -1,4 +1,4 @@
/* $NetBSD: config.h,v 1.50 2000/10/02 19:59:42 cgd Exp $ */ /* $NetBSD: config.h,v 1.51 2000/10/11 20:23:49 is Exp $ */
/* /*
* Copyright (c) 1992, 1993 * Copyright (c) 1992, 1993
@ -81,6 +81,7 @@
#define makedev(x,y) ((dev_t)((((x) << 8) & 0x000fff00) | \ #define makedev(x,y) ((dev_t)((((x) << 8) & 0x000fff00) | \
(((y) << 12) & 0xfff00000) | \ (((y) << 12) & 0xfff00000) | \
(((y) << 0) & 0x000000ff))) (((y) << 0) & 0x000000ff)))
#define __attribute__(x)
#endif /* MAKE_BOOTSTRAP */ #endif /* MAKE_BOOTSTRAP */
#define ARRCHR '#' #define ARRCHR '#'
@ -437,10 +438,14 @@ char *estrdup(const char *);
void prefix_push(const char *); void prefix_push(const char *);
void prefix_pop(void); void prefix_pop(void);
char *sourcepath(const char *); char *sourcepath(const char *);
void warn(const char *, ...); /* immediate warns */ void warn(const char *, ...) /* immediate warns */
void error(const char *, ...); /* immediate errs */ __attribute__((__format__(__printf__, 1, 2)));
void xerror(const char *, int, const char *, ...); /* delayed errs */ void error(const char *, ...) /* immediate errs */
__dead void panic(const char *, ...); __attribute__((__format__(__printf__, 1, 2)));
void xerror(const char *, int, const char *, ...) /* delayed errs */
__attribute__((__format__(__printf__, 3, 4)));
__dead void panic(const char *, ...)
__attribute__((__format__(__printf__, 1, 2)));
struct nvlist *newnv(const char *, const char *, void *, int, struct nvlist *); struct nvlist *newnv(const char *, const char *, void *, int, struct nvlist *);
void nvfree(struct nvlist *); void nvfree(struct nvlist *);
void nvfreel(struct nvlist *); void nvfreel(struct nvlist *);

View File

@ -1,4 +1,4 @@
/* $NetBSD: util.c,v 1.13 2000/10/02 19:48:35 cgd Exp $ */ /* $NetBSD: util.c,v 1.14 2000/10/11 20:23:50 is Exp $ */
/* /*
* Copyright (c) 1992, 1993 * Copyright (c) 1992, 1993
@ -53,10 +53,13 @@
#include "config.h" #include "config.h"
static void nomem(void); static void nomem(void);
static void vxerror(const char *, int, const char *, va_list); static void vxerror(const char *, int, const char *, va_list)
static void vxwarn(const char *, int, const char *, va_list); __attribute__((__format__(__printf__, 3, 0)));
static void vxwarn(const char *, int, const char *, va_list)
__attribute__((__format__(__printf__, 3, 0)));
static void vxmsg(const char *fname, int line, const char *class, static void vxmsg(const char *fname, int line, const char *class,
const char *fmt, va_list); const char *fmt, va_list)
__attribute__((__format__(__printf__, 4, 0)));
/* /*
* Malloc, with abort on error. * Malloc, with abort on error.

View File

@ -41,7 +41,7 @@
#ifndef lint #ifndef lint
static char ocopyright[] = static char ocopyright[] =
"$Id: dhclient.c,v 1.32 2000/09/04 23:19:30 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 Internet Software Consortium. All rights reserved.\n"; "$Id: dhclient.c,v 1.33 2000/10/11 20:23:50 is Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */ #endif /* not lint */
#include "dhcpd.h" #include "dhcpd.h"
@ -69,10 +69,10 @@ struct in_addr giaddr;
assert (state_is == state_shouldbe). */ assert (state_is == state_shouldbe). */
#define ASSERT_STATE(state_is, state_shouldbe) {} #define ASSERT_STATE(state_is, state_shouldbe) {}
static char copyright[] = "Copyright 1995-2000 Internet Software Consortium."; static const char copyright[] = "Copyright 1995-2000 Internet Software Consortium.";
static char arr [] = "All rights reserved."; static const char arr [] = "All rights reserved.";
static char message [] = "Internet Software Consortium DHCP Client"; static const char message [] = "Internet Software Consortium DHCP Client";
static char url [] = "For info, please visit http://www.isc.org/products/DHCP"; static const char url [] = "For info, please visit http://www.isc.org/products/DHCP";
u_int16_t local_port; u_int16_t local_port;
u_int16_t remote_port; u_int16_t remote_port;

View File

@ -43,7 +43,7 @@
#ifndef lint #ifndef lint
static char copyright[] = static char copyright[] =
"$Id: parse.c,v 1.1.1.9 2000/09/04 23:10:15 mellon Exp $ Copyright (c) 1995-2000 The Internet Software Consortium. All rights reserved.\n"; "$Id: parse.c,v 1.2 2000/10/11 20:23:50 is Exp $ Copyright (c) 1995-2000 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */ #endif /* not lint */
#include "dhcpd.h" #include "dhcpd.h"
@ -4082,7 +4082,10 @@ int parse_warn (struct parse *cfile, const char *fmt, ...)
#endif #endif
va_start (list, fmt); va_start (list, fmt);
vsnprintf (mbuf, sizeof mbuf, fbuf, list);
fmt = fbuf;
vsnprintf (mbuf, sizeof mbuf, fmt, list);
va_end (list); va_end (list);
lix = 0; lix = 0;

View File

@ -43,7 +43,7 @@
#ifndef lint #ifndef lint
static char copyright[] = static char copyright[] =
"$Id: print.c,v 1.1.1.7 2000/09/04 23:10:15 mellon Exp $ Copyright (c) 1995, 1996, 1998, 1999 The Internet Software Consortium. All rights reserved.\n"; "$Id: print.c,v 1.2 2000/10/11 20:23:50 is Exp $ Copyright (c) 1995, 1996, 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */ #endif /* not lint */
#include "dhcpd.h" #include "dhcpd.h"
@ -154,7 +154,7 @@ void dump_raw (buf, len)
for (i = 0; i < len; i++) { for (i = 0; i < len; i++) {
if ((i & 15) == 0) { if ((i & 15) == 0) {
if (lbix) if (lbix)
log_info (lbuf); log_info ("%s", lbuf);
sprintf (lbuf, "%03x:", i); sprintf (lbuf, "%03x:", i);
lbix = 4; lbix = 4;
} else if ((i & 7) == 0) } else if ((i & 7) == 0)
@ -162,7 +162,7 @@ void dump_raw (buf, len)
sprintf (&lbuf [lbix], " %02x", buf [i]); sprintf (&lbuf [lbix], " %02x", buf [i]);
lbix += 3; lbix += 3;
} }
log_info (lbuf); log_info ("%s", lbuf);
} }
void hash_dump (table) void hash_dump (table)
@ -182,7 +182,7 @@ void hash_dump (table)
if (bp -> len) if (bp -> len)
dump_raw (bp -> name, bp -> len); dump_raw (bp -> name, bp -> len);
else else
log_info ((const char *)bp -> name); log_info ("%s", (const char *)bp -> name);
} }
} }
} }
@ -1193,8 +1193,8 @@ void print_dns_status (int status, ns_updque *uq)
*s++ = '.'; *s++ = '.';
*s++ = 0; *s++ = 0;
if (errorp) if (errorp)
log_error (obuf); log_error ("%s", obuf);
else else
log_info (obuf); log_info ("%s", obuf);
} }
#endif /* NSUPDATE */ #endif /* NSUPDATE */

View File

@ -1,5 +1,5 @@
#if !defined(lint) && !defined(SABER) #if !defined(lint) && !defined(SABER)
static const char rcsid[] = "$Id: res_update.c,v 1.1.1.4 2000/07/20 05:50:24 mellon Exp $"; static const char rcsid[] = "$Id: res_update.c,v 1.2 2000/10/11 20:23:51 is Exp $";
#endif /* not lint */ #endif /* not lint */
/* /*
@ -73,7 +73,8 @@ struct zonegrp {
static int nscopy(struct sockaddr_in *, const struct sockaddr_in *, int); static int nscopy(struct sockaddr_in *, const struct sockaddr_in *, int);
static int nsprom(struct sockaddr_in *, const struct in_addr *, 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)));
void tkey_free (ns_tsig_key **); void tkey_free (ns_tsig_key **);

View File

@ -42,7 +42,7 @@
#ifndef lint #ifndef lint
static char copyright[] = static char copyright[] =
"$Id: errwarn.c,v 1.1.1.3 2000/09/04 23:10:32 mellon Exp $ Copyright (c) 1996 The Internet Software Consortium. All rights reserved.\n"; "$Id: errwarn.c,v 1.2 2000/10/11 20:23:51 is Exp $ Copyright (c) 1996 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */ #endif /* not lint */
#include <omapip/omapip_p.h> #include <omapip/omapip_p.h>
@ -68,7 +68,8 @@ void log_fatal (const char * fmt, ... )
do_percentm (fbuf, fmt); do_percentm (fbuf, fmt);
va_start (list, fmt); va_start (list, fmt);
vsnprintf (mbuf, sizeof mbuf, fbuf, list); fmt = fbuf;
vsnprintf (mbuf, sizeof mbuf, fmt, list);
va_end (list); va_end (list);
#ifndef DEBUG #ifndef DEBUG
@ -114,7 +115,8 @@ int log_error (const char * fmt, ...)
do_percentm (fbuf, fmt); do_percentm (fbuf, fmt);
va_start (list, fmt); va_start (list, fmt);
vsnprintf (mbuf, sizeof mbuf, fbuf, list); fmt = fbuf;
vsnprintf (mbuf, sizeof mbuf, fmt, list);
va_end (list); va_end (list);
#ifndef DEBUG #ifndef DEBUG
@ -138,7 +140,8 @@ int log_info (const char *fmt, ...)
do_percentm (fbuf, fmt); do_percentm (fbuf, fmt);
va_start (list, fmt); va_start (list, fmt);
vsnprintf (mbuf, sizeof mbuf, fbuf, list); fmt = fbuf;
vsnprintf (mbuf, sizeof mbuf, fmt, list);
va_end (list); va_end (list);
#ifndef DEBUG #ifndef DEBUG
@ -162,7 +165,8 @@ int log_debug (const char *fmt, ...)
do_percentm (fbuf, fmt); do_percentm (fbuf, fmt);
va_start (list, fmt); va_start (list, fmt);
vsnprintf (mbuf, sizeof mbuf, fbuf, list); fmt = fbuf;
vsnprintf (mbuf, sizeof mbuf, fmt, list);
va_end (list); va_end (list);
#ifndef DEBUG #ifndef DEBUG

View File

@ -43,7 +43,7 @@
#ifndef lint #ifndef lint
static char ocopyright[] = static char ocopyright[] =
"$Id: dhcrelay.c,v 1.6 2000/09/04 23:19:36 mellon Exp $ Copyright (c) 1997-2000 Internet Software Consortium. All rights reserved.\n"; "$Id: dhcrelay.c,v 1.7 2000/10/11 20:23:51 is Exp $ Copyright (c) 1997-2000 Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */ #endif /* not lint */
#include "dhcpd.h" #include "dhcpd.h"
@ -107,10 +107,10 @@ struct server_list {
struct sockaddr_in to; struct sockaddr_in to;
} *servers; } *servers;
static char copyright [] = "Copyright 1997-2000 Internet Software Consortium."; static const char copyright [] = "Copyright 1997-2000 Internet Software Consortium.";
static char arr [] = "All rights reserved."; static const char arr [] = "All rights reserved.";
static char message [] = "Internet Software Consortium DHCP Relay Agent"; static const char message [] = "Internet Software Consortium DHCP Relay Agent";
static char url [] = "For info, please visit http://www.isc.org/products/DHCP"; static const char url [] = "For info, please visit http://www.isc.org/products/DHCP";
int main (argc, argv, envp) int main (argc, argv, envp)
int argc; int argc;

View File

@ -43,14 +43,14 @@
#ifndef lint #ifndef lint
static char ocopyright[] = static char ocopyright[] =
"$Id: dhcpd.c,v 1.22 2000/09/04 23:19:38 mellon Exp $ Copyright 1995-2000 Internet Software Consortium."; "$Id: dhcpd.c,v 1.23 2000/10/11 20:23:51 is Exp $ Copyright 1995-2000 Internet Software Consortium.";
#endif #endif
static char copyright[] = static const char copyright[] =
"Copyright 1995-2000 Internet Software Consortium."; "Copyright 1995-2000 Internet Software Consortium.";
static char arr [] = "All rights reserved."; static const char arr [] = "All rights reserved.";
static char message [] = "Internet Software Consortium DHCP Server"; static const char message [] = "Internet Software Consortium DHCP Server";
static char url [] = "For info, please visit http://www.isc.org/products/DHCP"; static const char url [] = "For info, please visit http://www.isc.org/products/DHCP";
#include "dhcpd.h" #include "dhcpd.h"
#include "version.h" #include "version.h"

View File

@ -1,4 +1,4 @@
/* $NetBSD: gsp_ass.h,v 1.6 2000/07/23 23:14:10 mycroft Exp $ */ /* $NetBSD: gsp_ass.h,v 1.7 2000/10/11 20:23:52 is Exp $ */
/* /*
* GSP assembler - definitions * GSP assembler - definitions
* *
@ -145,8 +145,10 @@ void list_error(char *);
void listing(void); void listing(void);
symbol lookup(char *id, bool makeit); symbol lookup(char *id, bool makeit);
expr num_expr(int); expr num_expr(int);
void p1err(char *fmt, ...); void p1err(char *fmt, ...)
void perr(char *fmt, ...); __attribute__((__format__(__printf__, 1, 2)));
void perr(char *fmt, ...)
__attribute__((__format__(__printf__, 1, 2)));
void pseudo(int code, operand operands); void pseudo(int code, operand operands);
void push_input(char *fn); void push_input(char *fn);
void putcode(u_int16_t *, int); void putcode(u_int16_t *, int);

View File

@ -1,4 +1,4 @@
/* $NetBSD: gspa.c,v 1.6 2000/07/23 23:14:10 mycroft Exp $ */ /* $NetBSD: gspa.c,v 1.7 2000/10/11 20:23:52 is Exp $ */
/* /*
* GSP assembler main program * GSP assembler main program
* *
@ -33,7 +33,7 @@
#include <sys/cdefs.h> #include <sys/cdefs.h>
#ifndef lint #ifndef lint
__RCSID("$NetBSD: gspa.c,v 1.6 2000/07/23 23:14:10 mycroft Exp $"); __RCSID("$NetBSD: gspa.c,v 1.7 2000/10/11 20:23:52 is Exp $");
#endif #endif
#include <sys/param.h> #include <sys/param.h>
@ -287,7 +287,7 @@ void
yyerror(char *err) yyerror(char *err)
{ {
perr(err); perr("%s", err);
longjmp(synerrjmp, 1); longjmp(synerrjmp, 1);
} }

View File

@ -1,4 +1,4 @@
/* $NetBSD: displayq.c,v 1.17 1999/12/07 14:54:44 mrg Exp $ */ /* $NetBSD: displayq.c,v 1.18 2000/10/11 20:23:52 is Exp $ */
/* /*
* Copyright (c) 1983, 1993 * Copyright (c) 1983, 1993
@ -38,7 +38,7 @@
#if 0 #if 0
static char sccsid[] = "@(#)displayq.c 8.4 (Berkeley) 4/28/95"; static char sccsid[] = "@(#)displayq.c 8.4 (Berkeley) 4/28/95";
#else #else
__RCSID("$NetBSD: displayq.c,v 1.17 1999/12/07 14:54:44 mrg Exp $"); __RCSID("$NetBSD: displayq.c,v 1.18 2000/10/11 20:23:52 is Exp $");
#endif #endif
#endif /* not lint */ #endif /* not lint */
@ -84,8 +84,8 @@ static int lflag; /* long output option */
static int rank; /* order to be printed (-1=none, 0=active) */ static int rank; /* order to be printed (-1=none, 0=active) */
static long totsize; /* total print job size in bytes */ static long totsize; /* total print job size in bytes */
static char *head0 = "Rank Owner Job Files"; static const char head0[] = "Rank Owner Job Files";
static char *head1 = "Total Size\n"; static const char head1[] = "Total Size\n";
static void alarmer __P((int)); static void alarmer __P((int));

View File

@ -1,4 +1,4 @@
/* $NetBSD: lp.h,v 1.14 2000/04/16 14:43:58 mrg Exp $ */ /* $NetBSD: lp.h,v 1.15 2000/10/11 20:23:52 is Exp $ */
/* /*
* Copyright (c) 1983, 1993 * Copyright (c) 1983, 1993
@ -109,7 +109,8 @@ char *checkremote __P((void));
int chk __P((char *)); int chk __P((char *));
void displayq __P((int)); void displayq __P((int));
void dump __P((char *, char *, int)); void dump __P((char *, char *, int));
void fatal __P((const char *, ...)); void fatal __P((const char *, ...))
__attribute__((__format__(__printf__, 1, 2)));
int getline __P((FILE *)); int getline __P((FILE *));
int getport __P((char *, int)); int getport __P((char *, int));
int getq __P((struct queue *(*[]))); int getq __P((struct queue *(*[])));

View File

@ -1,4 +1,4 @@
/* $NetBSD: printjob.c,v 1.24 2000/09/26 17:44:38 itojun Exp $ */ /* $NetBSD: printjob.c,v 1.25 2000/10/11 20:23:52 is Exp $ */
/* /*
* Copyright (c) 1983, 1993 * Copyright (c) 1983, 1993
@ -45,7 +45,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 1993\n\
#if 0 #if 0
static char sccsid[] = "@(#)printjob.c 8.7 (Berkeley) 5/10/95"; static char sccsid[] = "@(#)printjob.c 8.7 (Berkeley) 5/10/95";
#else #else
__RCSID("$NetBSD: printjob.c,v 1.24 2000/09/26 17:44:38 itojun Exp $"); __RCSID("$NetBSD: printjob.c,v 1.25 2000/10/11 20:23:52 is Exp $");
#endif #endif
#endif /* not lint */ #endif /* not lint */
@ -130,7 +130,8 @@ static void opentty __P((void));
static void openrem __P((void)); static void openrem __P((void));
static int print __P((int, char *)); static int print __P((int, char *));
static int printit __P((char *)); static int printit __P((char *));
static void pstatus __P((const char *, ...)); static void pstatus __P((const char *, ...))
__attribute__((__format__(__printf__, 1, 2)));
static char response __P((void)); static char response __P((void));
static void scan_out __P((int, char *, int)); static void scan_out __P((int, char *, int));
static char *scnline __P((int, char *, int)); static char *scnline __P((int, char *, int));

View File

@ -1,4 +1,4 @@
/* $NetBSD: recvjob.c,v 1.11 1997/10/05 15:21:46 mrg Exp $ */ /* $NetBSD: recvjob.c,v 1.12 2000/10/11 20:23:52 is Exp $ */
/* /*
* Copyright (c) 1983, 1993 * Copyright (c) 1983, 1993
@ -45,7 +45,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 1993\n\
#if 0 #if 0
static char sccsid[] = "@(#)recvjob.c 8.2 (Berkeley) 4/27/95"; static char sccsid[] = "@(#)recvjob.c 8.2 (Berkeley) 4/27/95";
#else #else
__RCSID("$NetBSD: recvjob.c,v 1.11 1997/10/05 15:21:46 mrg Exp $"); __RCSID("$NetBSD: recvjob.c,v 1.12 2000/10/11 20:23:52 is Exp $");
#endif #endif
#endif /* not lint */ #endif /* not lint */
@ -78,7 +78,8 @@ static char *sp = "";
static char tfname[NAME_MAX]; /* tmp copy of cf before linking */ static char tfname[NAME_MAX]; /* tmp copy of cf before linking */
static int chksize __P((int)); static int chksize __P((int));
static void frecverr __P((const char *, ...)); static void frecverr __P((const char *, ...))
__attribute__((__format__(__printf__, 1, 2)));
static int noresponse __P((void)); static int noresponse __P((void));
static void rcleanup __P((int)); static void rcleanup __P((int));
static int read_number __P((char *)); static int read_number __P((char *));

View File

@ -1,4 +1,4 @@
/* $NetBSD: lpr.c,v 1.18 1998/07/27 00:52:01 mycroft Exp $ */ /* $NetBSD: lpr.c,v 1.19 2000/10/11 20:23:52 is Exp $ */
/* /*
* Copyright (c) 1983, 1989, 1993 * Copyright (c) 1983, 1989, 1993
@ -46,7 +46,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 1989, 1993\n\
#if 0 #if 0
static char sccsid[] = "@(#)lpr.c 8.4 (Berkeley) 4/28/95"; static char sccsid[] = "@(#)lpr.c 8.4 (Berkeley) 4/28/95";
#else #else
__RCSID("$NetBSD: lpr.c,v 1.18 1998/07/27 00:52:01 mycroft Exp $"); __RCSID("$NetBSD: lpr.c,v 1.19 2000/10/11 20:23:52 is Exp $");
#endif #endif
#endif /* not lint */ #endif /* not lint */
@ -108,7 +108,8 @@ static void card __P((int, const char *));
static void chkprinter __P((char *)); static void chkprinter __P((char *));
static void cleanup __P((int)); static void cleanup __P((int));
static void copy __P((int, char [])); static void copy __P((int, char []));
static void fatal2 __P((const char *, ...)); static void fatal2 __P((const char *, ...))
__attribute__((__format__(__printf__, 1, 2)));
static char *itoa __P((int)); static char *itoa __P((int));
static char *linked __P((char *)); static char *linked __P((char *));
static char *lmktemp __P((char *, int, int)); static char *lmktemp __P((char *, int, int));
@ -260,7 +261,7 @@ main(argc, argv)
if (SC && ncopies > 1) if (SC && ncopies > 1)
fatal2("multiple copies are not allowed"); fatal2("multiple copies are not allowed");
if (MC > 0 && ncopies > MC) if (MC > 0 && ncopies > MC)
fatal2("only %d copies are allowed", MC); fatal2("only %ld copies are allowed", MC);
/* /*
* Get the identity of the person doing the lpr using the same * Get the identity of the person doing the lpr using the same
* algorithm as lprm. * algorithm as lprm.

View File

@ -1,4 +1,4 @@
/* $NetBSD: mapper.c,v 1.4 1998/05/09 17:22:07 kleink Exp $ */ /* $NetBSD: mapper.c,v 1.5 2000/10/11 20:23:53 is Exp $ */
/* Mapper for connections between MRouteD multicast routers. /* Mapper for connections between MRouteD multicast routers.
* Written by Pavel Curtis <Pavel@PARC.Xerox.Com> * Written by Pavel Curtis <Pavel@PARC.Xerox.Com>
@ -91,6 +91,10 @@ int get_number __P((int *var, int deflt, char ***pargv,
int *pargc)); int *pargc));
u_int32_t host_addr __P((char *name)); u_int32_t host_addr __P((char *name));
#ifdef __STDC__
void log(int severity, int syserr, const char *format, ...)
__attribute__((__format__(__printf__, 3, 4)));
#endif
Node *find_node(addr, ptr) Node *find_node(addr, ptr)
u_int32_t addr; u_int32_t addr;
@ -160,7 +164,7 @@ Neighbor *find_neighbor(addr, node)
*/ */
#ifdef __STDC__ #ifdef __STDC__
void void
log(int severity, int syserr, char *format, ...) log(int severity, int syserr, const char *format, ...)
{ {
va_list ap; va_list ap;
char fmt[100]; char fmt[100];
@ -189,7 +193,8 @@ log(severity, syserr, format, va_alist)
if (severity == LOG_WARNING) if (severity == LOG_WARNING)
strcat(fmt, "warning - "); strcat(fmt, "warning - ");
strncat(fmt, format, 80); strncat(fmt, format, 80);
vfprintf(stderr, fmt, ap); format = fmt;
vfprintf(stderr, format, ap);
if (syserr == 0) if (syserr == 0)
fprintf(stderr, "\n"); fprintf(stderr, "\n");
else else

View File

@ -1,4 +1,4 @@
/* $NetBSD: mrinfo.c,v 1.7 1998/07/04 21:31:59 mrg Exp $ */ /* $NetBSD: mrinfo.c,v 1.8 2000/10/11 20:23:53 is Exp $ */
/* /*
* This tool requests configuration info from a multicast router * This tool requests configuration info from a multicast router
@ -67,7 +67,7 @@
static char rcsid[] = static char rcsid[] =
"@(#) Header: mrinfo.c,v 1.6 93/04/08 15:14:16 van Exp (LBL)"; "@(#) Header: mrinfo.c,v 1.6 93/04/08 15:14:16 van Exp (LBL)";
#else #else
__RCSID("$NetBSD: mrinfo.c,v 1.7 1998/07/04 21:31:59 mrg Exp $"); __RCSID("$NetBSD: mrinfo.c,v 1.8 2000/10/11 20:23:53 is Exp $");
#endif #endif
#endif #endif
@ -104,6 +104,10 @@ void usage __P((void));
/* to shut up -Wstrict-prototypes */ /* to shut up -Wstrict-prototypes */
int main __P((int argc, char *argv[])); int main __P((int argc, char *argv[]));
#ifdef __STDC__
void log(int severity, int syserr, char *format, ...)
__attribute__((__format__(__printf__, 3, 4)));
#endif
char * char *
@ -164,7 +168,8 @@ log(severity, syserr, format, va_alist)
if (severity == LOG_WARNING) if (severity == LOG_WARNING)
strcat(fmt, "warning - "); strcat(fmt, "warning - ");
strncat(fmt, format, 80); strncat(fmt, format, 80);
vfprintf(stderr, fmt, ap); format = fmt;
vfprintf(stderr, format, ap);
if (syserr == 0) if (syserr == 0)
fprintf(stderr, "\n"); fprintf(stderr, "\n");
else else

View File

@ -1,5 +1,5 @@
%{ %{
/* $NetBSD: cfparse.y,v 1.5 1998/03/30 02:33:37 mrg Exp $ */ /* $NetBSD: cfparse.y,v 1.6 2000/10/11 20:23:53 is Exp $ */
/* /*
* Configuration file parser for mrouted. * Configuration file parser for mrouted.
@ -19,8 +19,10 @@
/* /*
* Local function declarations * Local function declarations
*/ */
static void fatal __P((char *fmt, ...)); static void fatal __P((char *fmt, ...))
static void warn __P((char *fmt, ...)); __attribute__((__format__(__printf__, 1, 2)));
static void warn __P((char *fmt, ...))
__attribute__((__format__(__printf__, 1, 2)));
static void yyerror __P((char *s)); static void yyerror __P((char *s));
static char * next_word __P((void)); static char * next_word __P((void));
static int yylex __P((void)); static int yylex __P((void));

View File

@ -1,4 +1,4 @@
/* $NetBSD: defs.h,v 1.7 1997/10/17 10:38:03 lukem Exp $ */ /* $NetBSD: defs.h,v 1.8 2000/10/11 20:23:53 is Exp $ */
/* /*
* The mrouted program is covered by the license in the accompanying file * The mrouted program is covered by the license in the accompanying file
@ -161,7 +161,8 @@ extern char * sys_errlist[];
#endif #endif
/* main.c */ /* main.c */
extern void log __P((int, int, char *, ...)); extern void log __P((int, int, const char *, ...))
__attribute__((__format__(__printf__, 3, 4)));
extern int register_input_handler __P((int fd, ihfunc_t func)); extern int register_input_handler __P((int fd, ihfunc_t func));
/* igmp.c */ /* igmp.c */

View File

@ -1,4 +1,4 @@
/* $NetBSD: main.c,v 1.12 1999/06/06 03:27:06 thorpej Exp $ */ /* $NetBSD: main.c,v 1.13 2000/10/11 20:23:53 is Exp $ */
/* /*
* The mrouted program is covered by the license in the accompanying file * The mrouted program is covered by the license in the accompanying file
@ -33,7 +33,7 @@
#include <sys/cdefs.h> #include <sys/cdefs.h>
#ifndef lint #ifndef lint
__RCSID("@(#) $NetBSD: main.c,v 1.12 1999/06/06 03:27:06 thorpej Exp $"); __RCSID("@(#) $NetBSD: main.c,v 1.13 2000/10/11 20:23:53 is Exp $");
#endif #endif
#include <err.h> #include <err.h>
@ -79,6 +79,10 @@ static void resetlogging __P((void *));
/* To shut up gcc -Wstrict-prototypes */ /* To shut up gcc -Wstrict-prototypes */
int main __P((int argc, char **argv)); int main __P((int argc, char **argv));
#ifdef __STDC__
void log(int severity, int syserr, const char *format, ...)
__attribute__((__format__(__printf__, 3, 4)));
#endif
int int
register_input_handler(fd, func) register_input_handler(fd, func)
@ -643,7 +647,7 @@ resetlogging(arg)
*/ */
#ifdef __STDC__ #ifdef __STDC__
void void
log(int severity, int syserr, char *format, ...) log(int severity, int syserr, const char *format, ...)
{ {
va_list ap; va_list ap;
static char fmt[211] = "warning - "; static char fmt[211] = "warning - ";
@ -684,9 +688,9 @@ log(severity, syserr, format, va_alist)
gettimeofday(&now,NULL); gettimeofday(&now,NULL);
t = now.tv_sec; t = now.tv_sec;
thyme = localtime(&t); thyme = localtime(&t);
strftime(tbuf, sizeof(tbuf), "%X.%%03d ", thyme); strftime(tbuf, sizeof(tbuf), "%X", thyme);
fprintf(stderr, tbuf, now.tv_usec / 1000); fprintf(stderr, "%s.%03ld %s", tbuf, (long)now.tv_usec / 1000,
fprintf(stderr, "%s", msg); msg);
if (syserr == 0) if (syserr == 0)
fprintf(stderr, "\n"); fprintf(stderr, "\n");
else else

View File

@ -1,4 +1,4 @@
/* $NetBSD: mtrace.c,v 1.14 2000/01/21 17:08:37 mycroft Exp $ */ /* $NetBSD: mtrace.c,v 1.15 2000/10/11 20:23:53 is Exp $ */
/* /*
* mtrace.c * mtrace.c
@ -52,7 +52,7 @@
#include <sys/cdefs.h> #include <sys/cdefs.h>
#ifndef lint #ifndef lint
__RCSID("$NetBSD: mtrace.c,v 1.14 2000/01/21 17:08:37 mycroft Exp $"); __RCSID("$NetBSD: mtrace.c,v 1.15 2000/10/11 20:23:53 is Exp $");
#endif #endif
#include <sys/types.h> #include <sys/types.h>
@ -168,6 +168,10 @@ void check_vif_state __P((void));
void passive_mode __P((void)); void passive_mode __P((void));
int main __P((int argc, char *argv[])); int main __P((int argc, char *argv[]));
#ifdef __STDC__
void log(int severity, int syserr, char *format, ...)
__attribute__((__format__(__printf__, 3, 4)));
#endif
@ -1738,7 +1742,8 @@ log(severity, syserr, format, va_alist)
fmt[0] = '\0'; fmt[0] = '\0';
if (severity == LOG_WARNING) strcat(fmt, "warning - "); if (severity == LOG_WARNING) strcat(fmt, "warning - ");
strncat(fmt, format, 80); strncat(fmt, format, 80);
vfprintf(stderr, fmt, ap); format = fmt;
vfprintf(stderr, format, ap);
if (syserr == 0) if (syserr == 0)
fprintf(stderr, "\n"); fprintf(stderr, "\n");
else else

View File

@ -1,4 +1,4 @@
/* $NetBSD: create.c,v 1.25 1999/12/01 22:12:52 wennmach Exp $ */ /* $NetBSD: create.c,v 1.26 2000/10/11 20:23:54 is Exp $ */
/*- /*-
* Copyright (c) 1989, 1993 * Copyright (c) 1989, 1993
@ -38,7 +38,7 @@
#if 0 #if 0
static char sccsid[] = "@(#)create.c 8.1 (Berkeley) 6/6/93"; static char sccsid[] = "@(#)create.c 8.1 (Berkeley) 6/6/93";
#else #else
__RCSID("$NetBSD: create.c,v 1.25 1999/12/01 22:12:52 wennmach Exp $"); __RCSID("$NetBSD: create.c,v 1.26 2000/10/11 20:23:54 is Exp $");
#endif #endif
#endif /* not lint */ #endif /* not lint */
@ -76,7 +76,8 @@ static char codebuf[4*MAXPATHLEN + 1];
static const char extra[] = { ' ', '\t', '\n', '\\', '#', '\0' }; static const char extra[] = { ' ', '\t', '\n', '\\', '#', '\0' };
static int dsort __P((const FTSENT **, const FTSENT **)); static int dsort __P((const FTSENT **, const FTSENT **));
static void output __P((int *, const char *, ...)); static void output __P((int *, const char *, ...))
__attribute__((__format__(__printf__, 2, 3)));
static int statd __P((FTS *, FTSENT *, uid_t *, gid_t *, mode_t *, static int statd __P((FTS *, FTSENT *, uid_t *, gid_t *, mode_t *,
u_long *)); u_long *));
static void statf __P((FTSENT *)); static void statf __P((FTSENT *));
@ -191,7 +192,7 @@ statf(p)
crc(fd, &val, &len)) crc(fd, &val, &len))
mtree_err("%s: %s", p->fts_accpath, strerror(errno)); mtree_err("%s: %s", p->fts_accpath, strerror(errno));
(void)close(fd); (void)close(fd);
output(&indent, "cksum=%lu", val); output(&indent, "cksum=%lu", (long)val);
} }
if (keys & F_MD5 && S_ISREG(p->fts_statp->st_mode)) { if (keys & F_MD5 && S_ISREG(p->fts_statp->st_mode)) {
if ((md5cp = MD5File(p->fts_accpath, md5buf)) == NULL) if ((md5cp = MD5File(p->fts_accpath, md5buf)) == NULL)

View File

@ -1,4 +1,4 @@
/* $NetBSD: extern.h,v 1.7 1999/12/07 18:42:06 wennmach Exp $ */ /* $NetBSD: extern.h,v 1.8 2000/10/11 20:23:54 is Exp $ */
/*- /*-
* Copyright (c) 1991, 1993 * Copyright (c) 1991, 1993
@ -44,7 +44,8 @@
int compare __P((char *, NODE *, FTSENT *)); int compare __P((char *, NODE *, FTSENT *));
int crc __P((int, u_int32_t *, u_int32_t *)); int crc __P((int, u_int32_t *, u_int32_t *));
void cwalk __P((void)); void cwalk __P((void));
void mtree_err __P((const char *, ...)); void mtree_err __P((const char *, ...))
__attribute__((__format__(__printf__, 1, 2)));
char *inotype __P((u_int)); char *inotype __P((u_int));
u_int parsekey __P((char *, int *)); u_int parsekey __P((char *, int *));
char *rlink __P((char *)); char *rlink __P((char *));

View File

@ -1,4 +1,4 @@
/* $NetBSD: debug.c,v 1.7 2000/05/19 10:43:36 itojun Exp $ */ /* $NetBSD: debug.c,v 1.8 2000/10/11 20:23:54 is Exp $ */
/* /*
* Copyright (c) 1998 by the University of Southern California. * Copyright (c) 1998 by the University of Southern California.

View File

@ -1,4 +1,4 @@
/* $NetBSD: debug.h,v 1.2 2000/05/19 10:43:47 itojun Exp $ */ /* $NetBSD: debug.h,v 1.3 2000/10/11 20:23:54 is Exp $ */
/* /*
* Copyright (C) 1999 LSIIT Laboratory. * Copyright (C) 1999 LSIIT Laboratory.
@ -138,7 +138,8 @@ extern char *packet_kind __P((u_int proto, u_int type,
u_int code)); u_int code));
extern int debug_kind __P((u_int proto, u_int type, extern int debug_kind __P((u_int proto, u_int type,
u_int code)); u_int code));
extern void log __P((int, int, char *, ...)); extern void log __P((int, int, char *, ...))
__attribute__((__format__(__printf__, 3, 4)));
extern int log_level __P((u_int proto, u_int type, extern int log_level __P((u_int proto, u_int type,
u_int code)); u_int code));
extern void dump __P((int i)); extern void dump __P((int i));

View File

@ -1,11 +1,11 @@
/* $NetBSD: perform.c,v 1.54 2000/10/01 12:23:21 hubertf Exp $ */ /* $NetBSD: perform.c,v 1.55 2000/10/11 20:23:54 is Exp $ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
#ifndef lint #ifndef lint
#if 0 #if 0
static const char *rcsid = "from FreeBSD Id: perform.c,v 1.44 1997/10/13 15:03:46 jkh Exp"; static const char *rcsid = "from FreeBSD Id: perform.c,v 1.44 1997/10/13 15:03:46 jkh Exp";
#else #else
__RCSID("$NetBSD: perform.c,v 1.54 2000/10/01 12:23:21 hubertf Exp $"); __RCSID("$NetBSD: perform.c,v 1.55 2000/10/11 20:23:54 is Exp $");
#endif #endif
#endif #endif
@ -369,7 +369,6 @@ pkg_do(char *pkg)
* and we better stop right now. * and we better stop right now.
*/ */
char *s; char *s;
char *fmt = NULL;
int skip = -1; int skip = -1;
/* doing this right required to parse the full version(s), /* doing this right required to parse the full version(s),
@ -378,18 +377,17 @@ pkg_do(char *pkg)
continue; /* would remove trailing '}' else */ continue; /* would remove trailing '}' else */
if ((s = strpbrk(p->name, "<>")) != NULL) { if ((s = strpbrk(p->name, "<>")) != NULL) {
fmt = "%.*s-[0-9]*";
skip = 0; skip = 0;
} else if ((s = strrchr(p->name, '-')) != NULL) { } else if ((s = strrchr(p->name, '-')) != NULL) {
fmt = "%.*s[0-9]*";
skip = 1; skip = 1;
} }
if (fmt != NULL) { if (skip >= 0) {
char buf[FILENAME_MAX]; char buf[FILENAME_MAX];
(void) snprintf(buf, sizeof(buf), fmt, (void) snprintf(buf, sizeof(buf),
(int)(s - p->name) + skip, p->name); skip ? "%.*s[0-9]*" : "%.*s-[0-9]*",
(int)(s - p->name) + skip, p->name);
if (findmatchingname(dbdir, buf, note_whats_installed, installed) > 0) { if (findmatchingname(dbdir, buf, note_whats_installed, installed) > 0) {
warnx("pkg `%s' required, but `%s' found installed.", warnx("pkg `%s' required, but `%s' found installed.",
p->name, installed); p->name, installed);

View File

@ -1,11 +1,11 @@
/* $NetBSD: file.c,v 1.41 2000/10/11 11:09:20 hubertf Exp $ */ /* $NetBSD: file.c,v 1.42 2000/10/11 20:23:55 is Exp $ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
#ifndef lint #ifndef lint
#if 0 #if 0
static const char *rcsid = "from FreeBSD Id: file.c,v 1.29 1997/10/08 07:47:54 charnier Exp"; static const char *rcsid = "from FreeBSD Id: file.c,v 1.29 1997/10/08 07:47:54 charnier Exp";
#else #else
__RCSID("$NetBSD: file.c,v 1.41 2000/10/11 11:09:20 hubertf Exp $"); __RCSID("$NetBSD: file.c,v 1.42 2000/10/11 20:23:55 is Exp $");
#endif #endif
#endif #endif
@ -599,7 +599,7 @@ copy_file(char *dir, char *fname, char *to)
(void) snprintf(cmd, sizeof(cmd), "cp -r %s %s", fname, to); (void) snprintf(cmd, sizeof(cmd), "cp -r %s %s", fname, to);
else else
(void) snprintf(cmd, sizeof(cmd), "cp -r %s/%s %s", dir, fname, to); (void) snprintf(cmd, sizeof(cmd), "cp -r %s/%s %s", dir, fname, to);
if (vsystem(cmd)) { if (vsystem("%s", cmd)) {
cleanup(0); cleanup(0);
errx(2, "could not perform '%s'", cmd); errx(2, "could not perform '%s'", cmd);
} }
@ -614,7 +614,7 @@ move_file(char *dir, char *fname, char *to)
(void) snprintf(cmd, sizeof(cmd), "mv %s %s", fname, to); (void) snprintf(cmd, sizeof(cmd), "mv %s %s", fname, to);
else else
(void) snprintf(cmd, sizeof(cmd), "mv %s/%s %s", dir, fname, to); (void) snprintf(cmd, sizeof(cmd), "mv %s/%s %s", dir, fname, to);
if (vsystem(cmd)) { if (vsystem("%s", cmd)) {
cleanup(0); cleanup(0);
errx(2, "could not perform '%s'", cmd); errx(2, "could not perform '%s'", cmd);
} }

View File

@ -1,4 +1,4 @@
/* $NetBSD: lib.h,v 1.30 2000/08/28 21:35:14 hubertf Exp $ */ /* $NetBSD: lib.h,v 1.31 2000/10/11 20:23:55 is Exp $ */
/* from FreeBSD Id: lib.h,v 1.25 1997/10/08 07:48:03 charnier Exp */ /* from FreeBSD Id: lib.h,v 1.25 1997/10/08 07:48:03 charnier Exp */
@ -165,7 +165,8 @@ typedef int (*matchfn) (const char *found, char *data);
/* Prototypes */ /* Prototypes */
/* Misc */ /* Misc */
int vsystem(const char *,...); int vsystem(const char *,...)
__attribute__((__format__(__printf__, 1, 2)));
void cleanup(int); void cleanup(int);
char *make_playpen(char *, size_t, size_t); char *make_playpen(char *, size_t, size_t);
char *where_playpen(void); char *where_playpen(void);

View File

@ -1,4 +1,4 @@
/* $NetBSD: options.c,v 1.33 2000/09/23 22:39:37 christos Exp $ */ /* $NetBSD: options.c,v 1.34 2000/10/11 20:23:55 is Exp $ */
/* /*
* options.c - handles option processing for PPP. * options.c - handles option processing for PPP.
@ -24,7 +24,7 @@
#if 0 #if 0
#define RCSID "Id: options.c,v 1.76 2000/08/01 01:38:30 paulus Exp " #define RCSID "Id: options.c,v 1.76 2000/08/01 01:38:30 paulus Exp "
#else #else
__RCSID("$NetBSD: options.c,v 1.33 2000/09/23 22:39:37 christos Exp $"); __RCSID("$NetBSD: options.c,v 1.34 2000/10/11 20:23:55 is Exp $");
#endif #endif
#endif #endif
@ -280,7 +280,7 @@ option_t general_options[] = {
#define IMPLEMENTATION "" #define IMPLEMENTATION ""
#endif #endif
static char *usage_string = "\ static const char usage_string[] = "\
pppd version %s.%d%s\n\ pppd version %s.%d%s\n\
Usage: %s [ options ], where options are:\n\ Usage: %s [ options ], where options are:\n\
<device> Communicate over the named device\n\ <device> Communicate over the named device\n\

View File

@ -1,4 +1,4 @@
/* $NetBSD: pstat.c,v 1.52 2000/06/12 13:30:04 assar Exp $ */ /* $NetBSD: pstat.c,v 1.53 2000/10/11 20:23:55 is Exp $ */
/*- /*-
* Copyright (c) 1980, 1991, 1993, 1994 * Copyright (c) 1980, 1991, 1993, 1994
@ -43,7 +43,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1991, 1993, 1994\n\
#if 0 #if 0
static char sccsid[] = "@(#)pstat.c 8.16 (Berkeley) 5/9/95"; static char sccsid[] = "@(#)pstat.c 8.16 (Berkeley) 5/9/95";
#else #else
__RCSID("$NetBSD: pstat.c,v 1.52 2000/06/12 13:30:04 assar Exp $"); __RCSID("$NetBSD: pstat.c,v 1.53 2000/10/11 20:23:55 is Exp $");
#endif #endif
#endif /* not lint */ #endif /* not lint */
@ -713,7 +713,7 @@ kinfo_vnodes(avnodes)
return ((struct e_vnode *)vbuf); return ((struct e_vnode *)vbuf);
} }
char hdr[]=" LINE RAW CAN OUT HWT LWT COL STATE SESS PGID DISC\n"; const char hdr[]=" LINE RAW CAN OUT HWT LWT COL STATE SESS PGID DISC\n";
int ttyspace = 128; int ttyspace = 128;
void void

View File

@ -1,4 +1,4 @@
/* $NetBSD: rarpd.c,v 1.38 2000/08/30 11:01:43 abs Exp $ */ /* $NetBSD: rarpd.c,v 1.39 2000/10/11 20:23:55 is Exp $ */
/* /*
* Copyright (c) 1990 The Regents of the University of California. * Copyright (c) 1990 The Regents of the University of California.
@ -28,7 +28,7 @@ __COPYRIGHT(
#endif /* not lint */ #endif /* not lint */
#ifndef lint #ifndef lint
__RCSID("$NetBSD: rarpd.c,v 1.38 2000/08/30 11:01:43 abs Exp $"); __RCSID("$NetBSD: rarpd.c,v 1.39 2000/10/11 20:23:55 is Exp $");
#endif #endif
@ -96,7 +96,8 @@ struct if_info {
struct if_info *iflist; struct if_info *iflist;
u_int32_t choose_ipaddr __P((u_int32_t **, u_int32_t, u_int32_t)); u_int32_t choose_ipaddr __P((u_int32_t **, u_int32_t, u_int32_t));
void debug __P((const char *,...)); void debug __P((const char *,...))
__attribute__((__format__(__printf__, 1, 2)));
void init_all __P((void)); void init_all __P((void));
void init_one __P((char *, u_int32_t)); void init_one __P((char *, u_int32_t));
u_int32_t ipaddrtonetmask __P((u_int32_t)); u_int32_t ipaddrtonetmask __P((u_int32_t));
@ -108,7 +109,8 @@ int rarp_open __P((char *));
void rarp_process __P((struct if_info *, u_char *)); void rarp_process __P((struct if_info *, u_char *));
void rarp_reply __P((struct if_info *, struct ether_header *, u_int32_t, void rarp_reply __P((struct if_info *, struct ether_header *, u_int32_t,
struct hostent *)); struct hostent *));
void rarperr __P((int, const char *,...)); void rarperr __P((int, const char *,...))
__attribute__((__format__(__printf__, 2, 3)));
#if defined(__NetBSD__) #if defined(__NetBSD__)
#include "mkarp.h" #include "mkarp.h"

View File

@ -1,4 +1,4 @@
/* $NetBSD: utils.c,v 1.11 2000/03/27 17:07:23 kleink Exp $ */ /* $NetBSD: utils.c,v 1.12 2000/10/11 20:23:56 is Exp $ */
/* /*
* Copyright (c) 1988, 1992 The University of Utah and the Center * Copyright (c) 1988, 1992 The University of Utah and the Center
@ -51,7 +51,7 @@
#if 0 #if 0
static char sccsid[] = "@(#)utils.c 8.1 (Berkeley) 6/4/93"; static char sccsid[] = "@(#)utils.c 8.1 (Berkeley) 6/4/93";
#else #else
__RCSID("$NetBSD: utils.c,v 1.11 2000/03/27 17:07:23 kleink Exp $"); __RCSID("$NetBSD: utils.c,v 1.12 2000/10/11 20:23:56 is Exp $");
#endif #endif
#endif /* not lint */ #endif /* not lint */
@ -85,8 +85,8 @@ DispPkt(rconn, direct)
RMPCONN *rconn; RMPCONN *rconn;
int direct; int direct;
{ {
static char BootFmt[] = "\t\tRetCode:%u SeqNo:%lx SessID:%x Vers:%u"; static const char BootFmt[] = "\t\tRetCode:%u SeqNo:%lx SessID:%x Vers:%u";
static char ReadFmt[] = "\t\tRetCode:%u Offset:%lx SessID:%x\n"; static const char ReadFmt[] = "\t\tRetCode:%u Offset:%lx SessID:%x\n";
struct tm *tmp; struct tm *tmp;
struct rmp_packet *rmp; struct rmp_packet *rmp;
@ -141,7 +141,7 @@ DispPkt(rconn, direct)
} }
(void) fputc('\n', DbgFp); (void) fputc('\n', DbgFp);
(void) fprintf(DbgFp, BootFmt, rmp->r_brq.rmp_retcode, (void) fprintf(DbgFp, BootFmt, rmp->r_brq.rmp_retcode,
t, ntohs(rmp->r_brq.rmp_session), (unsigned long)t, ntohs(rmp->r_brq.rmp_session),
ntohs(rmp->r_brq.rmp_version)); ntohs(rmp->r_brq.rmp_version));
(void) fprintf(DbgFp, "\n\t\tMachine Type: "); (void) fprintf(DbgFp, "\n\t\tMachine Type: ");
for (i = 0; i < RMP_MACHLEN; i++) for (i = 0; i < RMP_MACHLEN; i++)
@ -152,7 +152,7 @@ DispPkt(rconn, direct)
fprintf(DbgFp, "\tBoot Reply:\n"); fprintf(DbgFp, "\tBoot Reply:\n");
GETWORD(rmp->r_brpl.rmp_seqno, t); GETWORD(rmp->r_brpl.rmp_seqno, t);
(void) fprintf(DbgFp, BootFmt, rmp->r_brpl.rmp_retcode, (void) fprintf(DbgFp, BootFmt, rmp->r_brpl.rmp_retcode,
t, ntohs(rmp->r_brpl.rmp_session), (unsigned long)t, ntohs(rmp->r_brpl.rmp_session),
ntohs(rmp->r_brpl.rmp_version)); ntohs(rmp->r_brpl.rmp_version));
DspFlnm(rmp->r_brpl.rmp_flnmsize,&rmp->r_brpl.rmp_flnm); DspFlnm(rmp->r_brpl.rmp_flnmsize,&rmp->r_brpl.rmp_flnm);
break; break;
@ -160,7 +160,7 @@ DispPkt(rconn, direct)
(void) fprintf(DbgFp, "\tRead Request:\n"); (void) fprintf(DbgFp, "\tRead Request:\n");
GETWORD(rmp->r_rrq.rmp_offset, t); GETWORD(rmp->r_rrq.rmp_offset, t);
(void) fprintf(DbgFp, ReadFmt, rmp->r_rrq.rmp_retcode, (void) fprintf(DbgFp, ReadFmt, rmp->r_rrq.rmp_retcode,
t, ntohs(rmp->r_rrq.rmp_session)); (unsigned long)t, ntohs(rmp->r_rrq.rmp_session));
(void) fprintf(DbgFp, "\t\tNoOfBytes: %u\n", (void) fprintf(DbgFp, "\t\tNoOfBytes: %u\n",
ntohs(rmp->r_rrq.rmp_size)); ntohs(rmp->r_rrq.rmp_size));
break; break;
@ -168,7 +168,7 @@ DispPkt(rconn, direct)
(void) fprintf(DbgFp, "\tRead Reply:\n"); (void) fprintf(DbgFp, "\tRead Reply:\n");
GETWORD(rmp->r_rrpl.rmp_offset, t); GETWORD(rmp->r_rrpl.rmp_offset, t);
(void) fprintf(DbgFp, ReadFmt, rmp->r_rrpl.rmp_retcode, (void) fprintf(DbgFp, ReadFmt, rmp->r_rrpl.rmp_retcode,
t, ntohs(rmp->r_rrpl.rmp_session)); (unsigned long)t, ntohs(rmp->r_rrpl.rmp_session));
(void) fprintf(DbgFp, "\t\tNoOfBytesSent: %ld\n", (void) fprintf(DbgFp, "\t\tNoOfBytesSent: %ld\n",
(long)(rconn->rmplen - RMPREADSIZE(0))); (long)(rconn->rmplen - RMPREADSIZE(0)));
break; break;

View File

@ -1,4 +1,4 @@
/* $NetBSD: lock_proc.c,v 1.6 2000/08/12 18:08:43 thorpej Exp $ */ /* $NetBSD: lock_proc.c,v 1.7 2000/10/11 20:23:56 is Exp $ */
/* /*
* Copyright (c) 1995 * Copyright (c) 1995
@ -35,7 +35,7 @@
#include <sys/cdefs.h> #include <sys/cdefs.h>
#ifndef lint #ifndef lint
__RCSID("$NetBSD: lock_proc.c,v 1.6 2000/08/12 18:08:43 thorpej Exp $"); __RCSID("$NetBSD: lock_proc.c,v 1.7 2000/10/11 20:23:56 is Exp $");
#endif #endif
#include <sys/param.h> #include <sys/param.h>
@ -227,7 +227,7 @@ get_client(host_addr, vers)
freenetconfigent(nconf); freenetconfigent(nconf);
if (!client) { if (!client) {
syslog(LOG_ERR, clnt_spcreateerror("clntudp_create")); syslog(LOG_ERR, "%s", clnt_spcreateerror("clntudp_create"));
syslog(LOG_ERR, "Unable to return result to %s", host); syslog(LOG_ERR, "Unable to return result to %s", host);
return NULL; return NULL;
} }

View File

@ -41,7 +41,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 1993\n\
#if 0 #if 0
static char sccsid[] = "@(#)rwhod.c 8.1 (Berkeley) 6/6/93"; static char sccsid[] = "@(#)rwhod.c 8.1 (Berkeley) 6/6/93";
#else #else
__RCSID("$NetBSD: rwhod.c,v 1.17 1999/12/30 09:10:28 itojun Exp $"); __RCSID("$NetBSD: rwhod.c,v 1.18 2000/10/11 20:23:56 is Exp $");
#endif #endif
#endif /* not lint */ #endif /* not lint */
@ -385,7 +385,7 @@ void
quit(msg) quit(msg)
char *msg; char *msg;
{ {
syslog(LOG_ERR, msg); syslog(LOG_ERR, "%s", msg);
exit(1); exit(1);
} }

View File

@ -1,4 +1,4 @@
/* $NetBSD: sesd.c,v 1.2 2000/02/22 06:06:08 mjacob Exp $ */ /* $NetBSD: sesd.c,v 1.3 2000/10/11 20:23:56 is Exp $ */
/* $FreeBSD: $ */ /* $FreeBSD: $ */
/* $OpenBSD: $ */ /* $OpenBSD: $ */
/* /*
@ -56,7 +56,7 @@ main(a, v)
int a; int a;
char **v; char **v;
{ {
static char *usage = static const char usage[] =
"usage: %s [ -d ] [ -t pollinterval ] device [ device ]\n"; "usage: %s [ -d ] [ -t pollinterval ] device [ device ]\n";
int fd, polltime, dev, devbase, nodaemon; int fd, polltime, dev, devbase, nodaemon;
ses_encstat stat, *carray; ses_encstat stat, *carray;

View File

@ -1,4 +1,4 @@
/* $NetBSD: log.c,v 1.5 1999/08/24 15:52:53 bouyer Exp $ */ /* $NetBSD: log.c,v 1.6 2000/10/11 20:23:57 is Exp $ */
/* /*
* Copyright (c) 1992 Carnegie Mellon University * Copyright (c) 1992 Carnegie Mellon University
@ -88,7 +88,7 @@ va_dcl
vsnprintf(buf, sizeof(buf), fmt, ap); vsnprintf(buf, sizeof(buf), fmt, ap);
va_end(ap); va_end(ap);
if (opened) { if (opened) {
syslog (LOG_ERR,buf); syslog (LOG_ERR, "%s", buf);
closelog (); closelog ();
exit (retval); exit (retval);
} }
@ -118,7 +118,7 @@ va_dcl
vsnprintf(buf, sizeof(buf), fmt, ap); vsnprintf(buf, sizeof(buf), fmt, ap);
va_end(ap); va_end(ap);
if (opened) { if (opened) {
syslog (LOG_ERR,buf); syslog (LOG_ERR, "%s", buf);
return; return;
} }
fprintf (stderr,"SUP: %s\n",buf); fprintf (stderr,"SUP: %s\n",buf);
@ -148,7 +148,7 @@ va_dcl
vsnprintf(buf, sizeof(buf), fmt, ap); vsnprintf(buf, sizeof(buf), fmt, ap);
va_end(ap); va_end(ap);
if (opened) { if (opened) {
syslog (LOG_INFO,buf); syslog (LOG_INFO, "%s", buf);
return; return;
} }
printf ("%s\n",buf); printf ("%s\n",buf);
@ -195,7 +195,7 @@ va_dcl
vsnprintf(buf, sizeof(buf), fmt, ap); vsnprintf(buf, sizeof(buf), fmt, ap);
va_end(ap); va_end(ap);
if (opened) { if (opened) {
syslog (deny_severity, buf); syslog (deny_severity, "%s", buf);
return; return;
} }
printf ("%s\n",buf); printf ("%s\n",buf);
@ -225,7 +225,7 @@ va_dcl
vsnprintf(buf, sizeof(buf), fmt, ap); vsnprintf(buf, sizeof(buf), fmt, ap);
va_end(ap); va_end(ap);
if (opened) { if (opened) {
syslog (allow_severity, buf); syslog (allow_severity, "%s", buf);
return; return;
} }
printf ("%s\n",buf); printf ("%s\n",buf);

View File

@ -1,4 +1,4 @@
/* $NetBSD: supextern.h,v 1.12 2000/07/21 16:03:14 tron Exp $ */ /* $NetBSD: supextern.h,v 1.13 2000/10/11 20:23:57 is Exp $ */
struct stat; struct stat;
@ -32,12 +32,17 @@ int filecopy __P((int, int ));
/* log.c */ /* log.c */
void logopen __P((char *)); void logopen __P((char *));
void logquit __P((int, char *, ...)); void logquit __P((int, char *, ...))
void logerr __P((char *, ...)); __attribute__((__format__(__printf__, 2, 3)));
void loginfo __P((char *, ...)); void logerr __P((char *, ...))
__attribute__((__format__(__printf__, 1, 2))) ;
void loginfo __P((char *, ...))
__attribute__((__format__(__printf__, 1, 2)));
#ifdef LIBWRAP #ifdef LIBWRAP
void logdeny __P((char *, ...)); void logdeny __P((char *, ...))
void logallow __P((char *, ...)); __attribute__((__format__(__printf__, 1, 2)));
void logallow __P((char *, ...))
__attribute__((__format__(__printf__, 1, 2)));
#endif #endif
/* netcryptvoid.c */ /* netcryptvoid.c */
@ -53,7 +58,8 @@ char *nxtarg __P((char **, char *));
void path __P((char *, char *, char *)); void path __P((char *, char *, char *));
/* quit.c */ /* quit.c */
void quit __P((int, char *, ...)); void quit __P((int, char *, ...))
__attribute__((__format__(__printf__, 2, 3)));
/* read_line.c */ /* read_line.c */
char *read_line __P((FILE *, size_t *, size_t *, const char[3], int)); char *read_line __P((FILE *, size_t *, size_t *, const char[3], int));
@ -88,7 +94,8 @@ char *remotehost __P((void));
int thishost __P((char *)); int thishost __P((char *));
int samehost __P((void)); int samehost __P((void));
int matchhost __P((char *)); int matchhost __P((char *));
int scmerr __P((int, char *, ...)); int scmerr __P((int, char *, ...))
__attribute__((__format__(__printf__, 2, 3)));
int byteswap __P((int)); int byteswap __P((int));
/* scmio.c */ /* scmio.c */
@ -141,8 +148,10 @@ int recvsym __P((TREE *, int, struct stat *));
int recvreg __P((TREE *, int, struct stat *)); int recvreg __P((TREE *, int, struct stat *));
int copyfile __P((char *, char *)); int copyfile __P((char *, char *));
void finishup __P((int)); void finishup __P((int));
void done __P((int, char *, ...)); void done __P((int, char *, ...))
void goaway __P((char *, ...)); __attribute__((__format__(__printf__, 2, 3)));
void goaway __P((char *, ...))
__attribute__((__format__(__printf__, 1, 2)));
/* supcmisc.c */ /* supcmisc.c */
void prtime __P((void)); void prtime __P((void));
@ -150,7 +159,8 @@ int establishdir __P((char *));
int makedir __P((char *, int, struct stat *)); int makedir __P((char *, int, struct stat *));
int estabd __P((char *, char *)); int estabd __P((char *, char *));
void ugconvert __P((char *, char *, int *, int *, int *)); void ugconvert __P((char *, char *, int *, int *, int *));
void notify __P((char *, ...)); void notify __P((char *, ...))
__attribute__((__format__(__printf__, 1, 2)));
void lockout __P((int)); void lockout __P((int));
char *fmttime __P((time_t)); char *fmttime __P((time_t));

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.9 1999/08/27 16:07:23 itojun Exp $ # $NetBSD: Makefile,v 1.10 2000/10/11 20:23:57 is Exp $
PROG= tcpdchk PROG= tcpdchk
SRCS= tcpdchk.c fakelog.c inetcf.c scaffold.c percent_m.c SRCS= tcpdchk.c fakelog.c inetcf.c scaffold.c percent_m.c
@ -11,5 +11,3 @@ CPPFLAGS+= -I${.CURDIR}/../../lib/libwrap
.include "${.CURDIR}/../../lib/libwrap/Makefile.cflags" .include "${.CURDIR}/../../lib/libwrap/Makefile.cflags"
.include <bsd.prog.mk> .include <bsd.prog.mk>
CFLAGS=

View File

@ -1,3 +1,4 @@
/* $NetBSD: percent_m.h,v 1.1 1997/10/11 21:41:41 christos Exp $ */ /* $NetBSD: percent_m.h,v 1.2 2000/10/11 20:23:57 is Exp $ */
char *percent_m __P((char *, const char *)); char *percent_m __P((char *, const char *))
__attribute__((__format_arg__(2)));

View File

@ -1,4 +1,4 @@
/* $NetBSD: print-bootp.c,v 1.6 1999/07/02 11:31:31 itojun Exp $ */ /* $NetBSD: print-bootp.c,v 1.7 2000/10/11 20:23:57 is Exp $ */
/* /*
* Copyright (c) 1990, 1991, 1993, 1994, 1995, 1996, 1997 * Copyright (c) 1990, 1991, 1993, 1994, 1995, 1996, 1997
@ -28,7 +28,7 @@
static const char rcsid[] = static const char rcsid[] =
"@(#) Header: print-bootp.c,v 1.45 97/06/15 13:20:28 leres Exp (LBL)"; "@(#) Header: print-bootp.c,v 1.45 97/06/15 13:20:28 leres Exp (LBL)";
#else #else
__RCSID("$NetBSD: print-bootp.c,v 1.6 1999/07/02 11:31:31 itojun Exp $"); __RCSID("$NetBSD: print-bootp.c,v 1.7 2000/10/11 20:23:57 is Exp $");
#endif #endif
#endif #endif
@ -394,7 +394,7 @@ static void
cmu_print(register const u_char *bp, register u_int length) cmu_print(register const u_char *bp, register u_int length)
{ {
register const struct cmu_vend *cmu; register const struct cmu_vend *cmu;
char *fmt = " %s:%s"; const char fmt[] = " %s:%s";
#define PRINTCMUADDR(m, s) { TCHECK(cmu->m); \ #define PRINTCMUADDR(m, s) { TCHECK(cmu->m); \
if (cmu->m.s_addr != 0) \ if (cmu->m.s_addr != 0) \

View File

@ -1,4 +1,4 @@
/* $NetBSD: user.c,v 1.24 2000/10/01 08:56:28 simonb Exp $ */ /* $NetBSD: user.c,v 1.25 2000/10/11 20:23:58 is Exp $ */
/* /*
* Copyright (c) 1999 Alistair G. Crooks. All rights reserved. * Copyright (c) 1999 Alistair G. Crooks. All rights reserved.
@ -36,7 +36,7 @@
__COPYRIGHT( __COPYRIGHT(
"@(#) Copyright (c) 1999 \ "@(#) Copyright (c) 1999 \
The NetBSD Foundation, Inc. All rights reserved."); The NetBSD Foundation, Inc. All rights reserved.");
__RCSID("$NetBSD: user.c,v 1.24 2000/10/01 08:56:28 simonb Exp $"); __RCSID("$NetBSD: user.c,v 1.25 2000/10/11 20:23:58 is Exp $");
#endif #endif
#include <sys/types.h> #include <sys/types.h>
@ -161,6 +161,9 @@ enum {
#define UNSET_EXPIRY "Null (unset)" #define UNSET_EXPIRY "Null (unset)"
static int asystem(const char *fmt, ...)
__attribute__((__format__(__printf__, 1, 2)));
static int verbose; static int verbose;
/* if *cpp is non-null, free it, then assign `n' chars of `s' to it */ /* if *cpp is non-null, free it, then assign `n' chars of `s' to it */
@ -177,7 +180,7 @@ memsave(char **cpp, char *s, size_t n)
/* a replacement for system(3) */ /* a replacement for system(3) */
static int static int
asystem(char *fmt, ...) asystem(const char *fmt, ...)
{ {
va_list vp; va_list vp;
char buf[MaxCommandLen]; char buf[MaxCommandLen];

View File

@ -1,4 +1,4 @@
/* $NetBSD: ypbind.c,v 1.42 2000/04/11 11:36:47 itojun Exp $ */ /* $NetBSD: ypbind.c,v 1.43 2000/10/11 20:23:58 is Exp $ */
/* /*
* Copyright (c) 1992, 1993 Theo de Raadt <deraadt@fsa.ca> * Copyright (c) 1992, 1993 Theo de Raadt <deraadt@fsa.ca>
@ -34,7 +34,7 @@
#include <sys/cdefs.h> #include <sys/cdefs.h>
#ifndef LINT #ifndef LINT
__RCSID("$NetBSD: ypbind.c,v 1.42 2000/04/11 11:36:47 itojun Exp $"); __RCSID("$NetBSD: ypbind.c,v 1.43 2000/10/11 20:23:58 is Exp $");
#endif #endif
#include <sys/param.h> #include <sys/param.h>
@ -135,7 +135,8 @@ int _yp_invalid_domain __P((const char *)); /* from libc */
int main __P((int, char *[])); int main __P((int, char *[]));
static void usage __P((void)); static void usage __P((void));
static void yp_log __P((int, const char *, ...)); static void yp_log __P((int, const char *, ...))
__attribute__((__format__(__printf__, 2, 3)));
static struct _dom_binding *makebinding __P((const char *)); static struct _dom_binding *makebinding __P((const char *));
static int makelock __P((struct _dom_binding *)); static int makelock __P((struct _dom_binding *));
static void removelock __P((struct _dom_binding *)); static void removelock __P((struct _dom_binding *));