Module Name: src Committed By: christos Date: Sun Oct 23 23:41:56 UTC 2011
Modified Files: src/sbin/iscsictl: iscsic_globals.h iscsic_main.c Log Message: add printflike and fix the format error. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sbin/iscsictl/iscsic_globals.h \ src/sbin/iscsictl/iscsic_main.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sbin/iscsictl/iscsic_globals.h diff -u src/sbin/iscsictl/iscsic_globals.h:1.1 src/sbin/iscsictl/iscsic_globals.h:1.2 --- src/sbin/iscsictl/iscsic_globals.h:1.1 Sun Oct 23 17:11:23 2011 +++ src/sbin/iscsictl/iscsic_globals.h Sun Oct 23 19:41:56 2011 @@ -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 @@ ntohq(uint64_t x) /* 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); Index: src/sbin/iscsictl/iscsic_main.c diff -u src/sbin/iscsictl/iscsic_main.c:1.1 src/sbin/iscsictl/iscsic_main.c:1.2 --- src/sbin/iscsictl/iscsic_main.c:1.1 Sun Oct 23 17:11:23 2011 +++ src/sbin/iscsictl/iscsic_main.c Sun Oct 23 19:41:56 2011 @@ -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 @@ get_response(int temp) 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];