From owner-svn-src-all@FreeBSD.ORG Thu Jul 15 22:34:30 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C8DB81065674; Thu, 15 Jul 2010 22:34:30 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9DA498FC17; Thu, 15 Jul 2010 22:34:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6FMYUBH021109; Thu, 15 Jul 2010 22:34:30 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6FMYUwV021107; Thu, 15 Jul 2010 22:34:30 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201007152234.o6FMYUwV021107@svn.freebsd.org> From: Warner Losh Date: Thu, 15 Jul 2010 22:34:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210145 - stable/8/usr.sbin/config X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jul 2010 22:34:30 -0000 Author: imp Date: Thu Jul 15 22:34:30 2010 New Revision: 210145 URL: http://svn.freebsd.org/changeset/base/210145 Log: MFC: r209135 r209135 | imp | 2010-06-13 10:54:11 -0600 (Sun, 13 Jun 2010) | 9 lines style(9) fixes: o make cmd scoped to the whole do_rules function, since it really is scoped to the whole fucnion. Making it static was the wrong way to fix referencing it outside of the block in which it was declared (and conforms to the style of the rest of the file). o remove a couple of meaningless blank lines o properly wrap one line. Modified: stable/8/usr.sbin/config/mkmakefile.c Directory Properties: stable/8/usr.sbin/config/ (props changed) Modified: stable/8/usr.sbin/config/mkmakefile.c ============================================================================== --- stable/8/usr.sbin/config/mkmakefile.c Thu Jul 15 22:28:19 2010 (r210144) +++ stable/8/usr.sbin/config/mkmakefile.c Thu Jul 15 22:34:30 2010 (r210145) @@ -683,6 +683,7 @@ do_rules(FILE *f) char *cp, *np, och; struct file_list *ftp; char *compilewith; + char cmd[128]; STAILQ_FOREACH(ftp, &ftab, f_next) { if (ftp->f_warn) @@ -720,25 +721,24 @@ do_rules(FILE *f) compilewith = ftp->f_compilewith; if (compilewith == 0) { const char *ftype = NULL; - static char cmd[128]; switch (ftp->f_type) { - case NORMAL: ftype = "NORMAL"; break; - case PROFILING: if (!profiling) continue; ftype = "PROFILE"; break; - default: printf("config: don't know rules for %s\n", np); break; } - snprintf(cmd, sizeof(cmd), "${%s_%c%s}\n.if defined(NORMAL_CTFCONVERT) && !empty(NORMAL_CTFCONVERT)\n\t${NORMAL_CTFCONVERT}\n.endif", ftype, + snprintf(cmd, sizeof(cmd), + "${%s_%c%s}\n.if defined(NORMAL_CTFCONVERT) && " + "!empty(NORMAL_CTFCONVERT)\n" + "\t${NORMAL_CTFCONVERT}\n.endif", ftype, toupper(och), ftp->f_flags & NOWERROR ? "_NOWERROR" : ""); compilewith = cmd;