Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 1 Jan 2012 23:51:39 +0000 (UTC)
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r229249 - stable/9/usr.sbin/uhsoctl
Message-ID:  <201201012351.q01NpdsA038190@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dim
Date: Sun Jan  1 23:51:38 2012
New Revision: 229249
URL: http://svn.freebsd.org/changeset/base/229249

Log:
  MFC r228721:
  
  In usr.sbin/uhsoctl/uhsoctl.c, fix a few warnings about format strings
  not being literals.

Modified:
  stable/9/usr.sbin/uhsoctl/uhsoctl.c
Directory Properties:
  stable/9/usr.sbin/uhsoctl/   (props changed)

Modified: stable/9/usr.sbin/uhsoctl/uhsoctl.c
==============================================================================
--- stable/9/usr.sbin/uhsoctl/uhsoctl.c	Sun Jan  1 23:51:18 2012	(r229248)
+++ stable/9/usr.sbin/uhsoctl/uhsoctl.c	Sun Jan  1 23:51:38 2012	(r229249)
@@ -340,7 +340,7 @@ logger(int pri, const char *fmt, ...)
 	va_start(ap, fmt);
 	vasprintf(&buf, fmt, ap);
 	if (syslog_open)
-		syslog(pri, buf);
+		syslog(pri, "%s", buf);
 	else {
 		switch (pri) {
 		case LOG_INFO:
@@ -1174,7 +1174,7 @@ do_connect(struct ctx *ctx, const char *
 			buf = ra.val[0].ptr;
 			if (strstr(buf[0], "+CME ERROR:") != NULL) {
 				buf[0] += 12;
-				errx(1, buf[0]);
+				errx(1, "%s", buf[0]);
 			}
 			freeresp(&ra);
 		} else



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