Date: Thu, 21 Nov 2013 21:19:01 +0000 (UTC) From: Eitan Adler <eadler@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258446 - head/usr.bin/from Message-ID: <201311212119.rALLJ1W3062689@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: eadler Date: Thu Nov 21 21:19:01 2013 New Revision: 258446 URL: http://svnweb.freebsd.org/changeset/base/258446 Log: Add static where appropriate. Sync with some of DragonflyBSD's latest cleanups Reviewed by: mjg Modified: head/usr.bin/from/from.c Modified: head/usr.bin/from/from.c ============================================================================== --- head/usr.bin/from/from.c Thu Nov 21 21:05:11 2013 (r258445) +++ head/usr.bin/from/from.c Thu Nov 21 21:19:01 2013 (r258446) @@ -51,7 +51,7 @@ __FBSDID("$FreeBSD$"); #include <string.h> #include <unistd.h> -int match(const char *, const char *); +static int match(const char *, const char *); static void usage(void); int @@ -81,8 +81,7 @@ main(int argc, char **argv) case 's': sender = optarg; for (p = sender; *p; ++p) - if (isupper(*p)) - *p = tolower(*p); + *p = tolower(*p); break; case '?': default: @@ -142,7 +141,7 @@ usage(void) exit(1); } -int +static int match(const char *line, const char *sender) { char ch, pch, first; @@ -152,15 +151,14 @@ match(const char *line, const char *send if (isspace(ch = *line)) return(0); ++line; - if (isupper(ch)) - ch = tolower(ch); + ch = tolower(ch); if (ch != first) continue; for (p = sender, t = line;;) { if (!(pch = *p++)) return(1); - if (isupper(ch = *t++)) - ch = tolower(ch); + ch = tolower(*t); + t++; if (ch != pch) break; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201311212119.rALLJ1W3062689>