From owner-svn-src-all@FreeBSD.ORG Sun Nov 6 18:49:42 2011 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 424A01065881; Sun, 6 Nov 2011 18:49:42 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3288D8FC18; Sun, 6 Nov 2011 18:49:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pA6Ingbp036071; Sun, 6 Nov 2011 18:49:42 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pA6IngsR036069; Sun, 6 Nov 2011 18:49:42 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201111061849.pA6IngsR036069@svn.freebsd.org> From: Ed Schouten Date: Sun, 6 Nov 2011 18:49:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r227240 - head/usr.bin/lam 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: Sun, 06 Nov 2011 18:49:42 -0000 Author: ed Date: Sun Nov 6 18:49:41 2011 New Revision: 227240 URL: http://svn.freebsd.org/changeset/base/227240 Log: Mark global functions and/or variables in lam(1) static where possible. This allows compilers and static analyzers to more thorough analysis. Modified: head/usr.bin/lam/lam.c Modified: head/usr.bin/lam/lam.c ============================================================================== --- head/usr.bin/lam/lam.c Sun Nov 6 18:49:36 2011 (r227239) +++ head/usr.bin/lam/lam.c Sun Nov 6 18:49:41 2011 (r227240) @@ -55,7 +55,7 @@ __FBSDID("$FreeBSD$"); #define MAXOFILES 20 #define BIGBUFSIZ 5 * BUFSIZ -struct openfile { /* open file structure */ +static struct openfile { /* open file structure */ FILE *fp; /* file pointer */ short eof; /* eof flag */ short pad; /* pad flag for missing columns */ @@ -64,10 +64,10 @@ struct openfile { /* open file structur const char *format; /* printf(3) style string spec. */ } input[MAXOFILES]; -int morefiles; /* set by getargs(), changed by gatherline() */ -int nofinalnl; /* normally append \n to each output line */ -char line[BIGBUFSIZ]; -char *linep; +static int morefiles; /* set by getargs(), changed by gatherline() */ +static int nofinalnl; /* normally append \n to each output line */ +static char line[BIGBUFSIZ]; +static char *linep; static char *gatherline(struct openfile *); static void getargs(char *[]);