aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/from
diff options
context:
space:
mode:
authorSimon J. Gerraty <sjg@FreeBSD.org>2014-04-28 07:50:45 +0000
committerSimon J. Gerraty <sjg@FreeBSD.org>2014-04-28 07:50:45 +0000
commit3b8f08459569bf0faa21473e5cec2491e95c9349 (patch)
tree80f45dd81ca716bcd7ca9674581e1fc40b93cd34 /usr.bin/from
parent9d2ab4a62d6733c45958627ac113bdbd818d1e2a (diff)
parentb2ba55951383498f252746f618d513139da06e8e (diff)
downloadsrc-3b8f08459569bf0faa21473e5cec2491e95c9349.tar.gz
src-3b8f08459569bf0faa21473e5cec2491e95c9349.zip
Merge head
Notes
Notes: svn path=/projects/bmake/; revision=265044
Diffstat (limited to 'usr.bin/from')
-rw-r--r--usr.bin/from/from.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/usr.bin/from/from.c b/usr.bin/from/from.c
index 7bf7271e06fb..226270359dc6 100644
--- a/usr.bin/from/from.c
+++ b/usr.bin/from/from.c
@@ -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 *sender)
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;
}