Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/mail Mark sasprintf as using a printf-like format. F...
details: https://anonhg.NetBSD.org/src/rev/046d838fdfba
branches: trunk
changeset: 777673:046d838fdfba
user: joerg <joerg%NetBSD.org@localhost>
date: Tue Feb 28 22:30:44 2012 +0000
description:
Mark sasprintf as using a printf-like format. Fix format string to use
all arguments by telling the user what file would be overwritten.
diffstat:
usr.bin/mail/extern.h | 6 +++---
usr.bin/mail/mime_detach.c | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
diffs (54 lines):
diff -r dbee20565e29 -r 046d838fdfba usr.bin/mail/extern.h
--- a/usr.bin/mail/extern.h Tue Feb 28 22:07:54 2012 +0000
+++ b/usr.bin/mail/extern.h Tue Feb 28 22:30:44 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: extern.h,v 1.31 2009/04/10 13:08:24 christos Exp $ */
+/* $NetBSD: extern.h,v 1.32 2012/02/28 22:30:44 joerg Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -29,7 +29,7 @@
* SUCH DAMAGE.
*
* @(#)extern.h 8.2 (Berkeley) 4/20/95
- * $NetBSD: extern.h,v 1.31 2009/04/10 13:08:24 christos Exp $
+ * $NetBSD: extern.h,v 1.32 2012/02/28 22:30:44 joerg Exp $
*/
#ifndef __EXTERN_H__
@@ -294,7 +294,7 @@
void istrcpy(char *, const char *);
int member(char *, struct ignoretab *);
char * nameof(struct message *, int);
-int sasprintf(char **ret, const char *format, ...);
+int sasprintf(char **ret, const char *format, ...) __printflike(2, 3);
char * savestr(const char *);
struct message *set_m_flag(int, int, int);
char * skin(char *);
diff -r dbee20565e29 -r 046d838fdfba usr.bin/mail/mime_detach.c
--- a/usr.bin/mail/mime_detach.c Tue Feb 28 22:07:54 2012 +0000
+++ b/usr.bin/mail/mime_detach.c Tue Feb 28 22:30:44 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mime_detach.c,v 1.6 2011/05/24 12:33:22 joerg Exp $ */
+/* $NetBSD: mime_detach.c,v 1.7 2012/02/28 22:30:44 joerg Exp $ */
/*-
* Copyright (c) 2006 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
#include <sys/cdefs.h>
#ifndef __lint__
-__RCSID("$NetBSD: mime_detach.c,v 1.6 2011/05/24 12:33:22 joerg Exp $");
+__RCSID("$NetBSD: mime_detach.c,v 1.7 2012/02/28 22:30:44 joerg Exp $");
#endif /* not __lint__ */
#include <assert.h>
@@ -132,7 +132,7 @@
if (detach_ctl.ask && fd == -1 && errno == EEXIST) {
char *p;
start:
- (void)sasprintf(&p, "%-7s overwrite: Always/Never/once/next/rename (ANonr)[n]? ",
+ (void)sasprintf(&p, "%-7s overwrite %s: Always/Never/once/next/rename (ANonr)[n]? ",
partstr, fname);
p = my_gets(&elm.string, p, NULL);
if (p == NULL)
Home |
Main Index |
Thread Index |
Old Index