More format paranoia.

This commit is contained in:
sommerfeld 2000-07-08 18:24:28 +00:00
parent d5906caa54
commit 6f0015c48f
3 changed files with 13 additions and 11 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: extern.h,v 1.28 2000/06/19 15:15:03 lukem Exp $ */
/* $NetBSD: extern.h,v 1.29 2000/07/08 18:24:28 sommerfeld Exp $ */
/*-
* Copyright (c) 1992, 1993
@ -105,7 +105,8 @@ void closedataconn(FILE *);
char *conffilename(const char *);
char **copyblk(char **);
void count_users(void);
void cprintf(FILE *, const char *, ...);
void cprintf(FILE *, const char *, ...)
__attribute__((__format__(__printf__, 2, 3)));
void cwd(const char *);
FILE *dataconn(const char *, off_t, const char *);
void delete(const char *);
@ -135,7 +136,8 @@ void pwd(void);
void removedir(const char *);
void renamecmd(const char *, const char *);
char *renamefrom(const char *);
void reply(int, const char *, ...);
void reply(int, const char *, ...)
__attribute__((__format__(__printf__, 2, 3)));
void retrieve(char *[], const char *);
void send_file_list(const char *);
void show_chdir_messages(int);

View File

@ -1,4 +1,4 @@
/* $NetBSD: ftpcmd.y,v 1.48 2000/06/19 15:15:03 lukem Exp $ */
/* $NetBSD: ftpcmd.y,v 1.49 2000/07/08 18:24:28 sommerfeld Exp $ */
/*-
* Copyright (c) 1997-2000 The NetBSD Foundation, Inc.
@ -83,7 +83,7 @@
#if 0
static char sccsid[] = "@(#)ftpcmd.y 8.3 (Berkeley) 4/6/94";
#else
__RCSID("$NetBSD: ftpcmd.y,v 1.48 2000/06/19 15:15:03 lukem Exp $");
__RCSID("$NetBSD: ftpcmd.y,v 1.49 2000/07/08 18:24:28 sommerfeld Exp $");
#endif
#endif /* not lint */
@ -225,7 +225,7 @@ cmd
| QUIT CRLF
{
if (logged_in) {
reply(-221, "");
reply(-221, "%s", "");
reply(0,
"Data traffic for this session was %qd byte%s in %qd file%s.",
(qdfmt_t)total_data, PLURAL(total_data),
@ -1867,7 +1867,7 @@ help(struct tab *ctab, const char *s)
int i, j, w;
int columns, lines;
reply(-214, "");
reply(-214, "%s", "");
reply(0, "The following %scommands are recognized.", type);
reply(0, "(`-' = not implemented, `+' = supports options)");
columns = 76 / width;

View File

@ -1,4 +1,4 @@
/* $NetBSD: ftpd.c,v 1.97 2000/07/05 22:15:04 itojun Exp $ */
/* $NetBSD: ftpd.c,v 1.98 2000/07/08 18:24:28 sommerfeld Exp $ */
/*
* Copyright (c) 1997-2000 The NetBSD Foundation, Inc.
@ -109,7 +109,7 @@ __COPYRIGHT(
#if 0
static char sccsid[] = "@(#)ftpd.c 8.5 (Berkeley) 4/28/95";
#else
__RCSID("$NetBSD: ftpd.c,v 1.97 2000/07/05 22:15:04 itojun Exp $");
__RCSID("$NetBSD: ftpd.c,v 1.98 2000/07/08 18:24:28 sommerfeld Exp $");
#endif
#endif /* not lint */
@ -800,7 +800,7 @@ pass(const char *passwd)
* succeeded.
*/
if (rval) {
reply(530, rval == 2 ? "Password expired." :
reply(530, "%s", rval == 2 ? "Password expired." :
"Login incorrect.");
if (logging) {
syslog(LOG_NOTICE,
@ -1803,7 +1803,7 @@ statcmd(void)
if (logged_in) {
struct ftpconv *cp;
reply(0, "");
reply(0, "%s", "");
reply(0, "Class: %s, type: %s",
curclass.classname, CURCLASSTYPE);
reply(0, "Check PORT/LPRT commands: %sabled",