diff options
| author | is <is@NetBSD.org> | 2000-10-11 20:23:46 +0000 |
|---|---|---|
| committer | is <is@NetBSD.org> | 2000-10-11 20:23:46 +0000 |
| commit | d8302e2d73ac3fde74ec6f157dcba7ddbd24fed2 (patch) | |
| tree | 82097652f5c91d8e45d5b43f53eb7470aa1d0392 /usr.sbin/pkg_install/lib | |
| parent | 7f3f19a0680c4d2c4b935a576fa930aac4a3d26d (diff) | |
More format string cleanups by sommerfeld.
Diffstat (limited to 'usr.sbin/pkg_install/lib')
| -rw-r--r-- | usr.sbin/pkg_install/lib/file.c | 8 | ||||
| -rw-r--r-- | usr.sbin/pkg_install/lib/lib.h | 5 |
2 files changed, 7 insertions, 6 deletions
diff --git a/usr.sbin/pkg_install/lib/file.c b/usr.sbin/pkg_install/lib/file.c index ca106617468..b1e5f222efb 100644 --- a/usr.sbin/pkg_install/lib/file.c +++ b/usr.sbin/pkg_install/lib/file.c @@ -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> #ifndef lint #if 0 static const char *rcsid = "from FreeBSD Id: file.c,v 1.29 1997/10/08 07:47:54 charnier Exp"; #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 @@ -599,7 +599,7 @@ copy_file(char *dir, char *fname, char *to) (void) snprintf(cmd, sizeof(cmd), "cp -r %s %s", fname, to); else (void) snprintf(cmd, sizeof(cmd), "cp -r %s/%s %s", dir, fname, to); - if (vsystem(cmd)) { + if (vsystem("%s", cmd)) { cleanup(0); 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); else (void) snprintf(cmd, sizeof(cmd), "mv %s/%s %s", dir, fname, to); - if (vsystem(cmd)) { + if (vsystem("%s", cmd)) { cleanup(0); errx(2, "could not perform '%s'", cmd); } diff --git a/usr.sbin/pkg_install/lib/lib.h b/usr.sbin/pkg_install/lib/lib.h index f07a9b10c7f..d0cd70ef386 100644 --- a/usr.sbin/pkg_install/lib/lib.h +++ b/usr.sbin/pkg_install/lib/lib.h @@ -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 */ @@ -165,7 +165,8 @@ typedef int (*matchfn) (const char *found, char *data); /* Prototypes */ /* Misc */ -int vsystem(const char *,...); +int vsystem(const char *,...) + __attribute__((__format__(__printf__, 1, 2))); void cleanup(int); char *make_playpen(char *, size_t, size_t); char *where_playpen(void); |
