Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sbin/iscsictl add printflike and fix the format error.



details:   https://anonhg.NetBSD.org/src/rev/1bc0fea75802
branches:  trunk
changeset: 770574:1bc0fea75802
user:      christos <christos%NetBSD.org@localhost>
date:      Sun Oct 23 23:41:56 2011 +0000

description:
add printflike and fix the format error.

diffstat:

 sbin/iscsictl/iscsic_globals.h |  8 ++++----
 sbin/iscsictl/iscsic_main.c    |  4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)

diffs (41 lines):

diff -r 2c6d7e87db8f -r 1bc0fea75802 sbin/iscsictl/iscsic_globals.h
--- a/sbin/iscsictl/iscsic_globals.h    Sun Oct 23 22:02:45 2011 +0000
+++ b/sbin/iscsictl/iscsic_globals.h    Sun Oct 23 23:41:56 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: iscsic_globals.h,v 1.1 2011/10/23 21:11:23 agc Exp $   */
+/*     $NetBSD: iscsic_globals.h,v 1.2 2011/10/23 23:41:56 christos Exp $      */
 
 /*-
  * Copyright (c) 2005,2006,2011 The NetBSD Foundation, Inc.
@@ -152,10 +152,10 @@
 
 /* iscsic_main.c */
 
-void arg_error(char *, const char *, ...);
+void arg_error(char *, const char *, ...) __printflike(2, 3);
 void arg_missing(const char *);
-void io_error(const char *, ...);
-void gen_error(const char *, ...);
+void io_error(const char *, ...) __printflike(1, 2);
+void gen_error(const char *, ...) __printflike(1, 2);
 void check_extra_args(int, char **);
 void status_error(unsigned);
 void status_error_slist(unsigned);
diff -r 2c6d7e87db8f -r 1bc0fea75802 sbin/iscsictl/iscsic_main.c
--- a/sbin/iscsictl/iscsic_main.c       Sun Oct 23 22:02:45 2011 +0000
+++ b/sbin/iscsictl/iscsic_main.c       Sun Oct 23 23:41:56 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: iscsic_main.c,v 1.1 2011/10/23 21:11:23 agc Exp $      */
+/*     $NetBSD: iscsic_main.c,v 1.2 2011/10/23 23:41:56 christos Exp $ */
 
 /*-
  * Copyright (c) 2005,2006,2011 The NetBSD Foundation, Inc.
@@ -441,7 +441,7 @@
 
        if (temp) {
                if (NULL == (pbuf = (int *) malloc(len + sizeof(int))))
-                       gen_error("Can't allocate response buffer (%d bytes)",
+                       gen_error("Can't allocate response buffer (%zu bytes)",
                                len + sizeof(int));
 
                rsp = (iscsid_response_t *) & pbuf[1];



Home | Main Index | Thread Index | Old Index