diff options
author | Doug Barton <dougb@FreeBSD.org> | 2011-08-02 05:18:50 +0000 |
---|---|---|
committer | Doug Barton <dougb@FreeBSD.org> | 2011-08-02 05:18:50 +0000 |
commit | 0842d663b7cfb84b478ec937fc1dbc640ceae92b (patch) | |
tree | 4385ddab756952a705f233916d0536e76fe9cc58 /lib/isc/string.c | |
parent | 6a50a75ead6b2f11f0321914c033e8c8670cbb60 (diff) |
Notes
Diffstat (limited to 'lib/isc/string.c')
-rw-r--r-- | lib/isc/string.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/isc/string.c b/lib/isc/string.c index 3bcea3a2352a..095323f7cc88 100644 --- a/lib/isc/string.c +++ b/lib/isc/string.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2007, 2011 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1999-2001, 2003 Internet Software Consortium. * * Permission to use, copy, modify, and/or distribute this software for any @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: string.c,v 1.20 2007-06-19 23:47:17 tbox Exp $ */ +/* $Id: string.c,v 1.20.332.2 2011-03-12 04:57:28 tbox Exp $ */ /*! \file */ @@ -165,14 +165,15 @@ isc_string_printf(char *target, size_t size, const char *format, ...) { } void -isc_string_printf_truncate(char *target, size_t size, const char *format, ...) { +isc_string_printf_truncate(char *target, size_t size, const char *format, ...) +{ va_list args; - size_t n; REQUIRE(size > 0U); va_start(args, format); - n = vsnprintf(target, size, format, args); + /* check return code? */ + (void)vsnprintf(target, size, format, args); va_end(args); ENSURE(strlen(target) < size); |