Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 4 Jan 2011 13:02:52 +0000 (UTC)
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r216953 - head/lib/libugidfw
Message-ID:  <201101041302.p04D2qkE036718@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: emaste
Date: Tue Jan  4 13:02:52 2011
New Revision: 216953
URL: http://svn.freebsd.org/changeset/base/216953

Log:
  Quiet clang warnings by using string literal format strings.

Modified:
  head/lib/libugidfw/ugidfw.c

Modified: head/lib/libugidfw/ugidfw.c
==============================================================================
--- head/lib/libugidfw/ugidfw.c	Tue Jan  4 10:59:38 2011	(r216952)
+++ head/lib/libugidfw/ugidfw.c	Tue Jan  4 13:02:52 2011	(r216953)
@@ -1134,7 +1134,7 @@ bsde_get_rule_count(size_t buflen, char 
 	len = sizeof(rule_count);
 	error = sysctlbyname(MIB ".rule_count", &rule_count, &len, NULL, 0);
 	if (error) {
-		len = snprintf(errstr, buflen, strerror(errno));
+		len = snprintf(errstr, buflen, "%s", strerror(errno));
 		return (-1);
 	}
 	if (len != sizeof(rule_count)) {
@@ -1156,7 +1156,7 @@ bsde_get_rule_slots(size_t buflen, char 
 	len = sizeof(rule_slots);
 	error = sysctlbyname(MIB ".rule_slots", &rule_slots, &len, NULL, 0);
 	if (error) {
-		len = snprintf(errstr, buflen, strerror(errno));
+		len = snprintf(errstr, buflen, "%s", strerror(errno));
 		return (-1);
 	}
 	if (len != sizeof(rule_slots)) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201101041302.p04D2qkE036718>