diff options
author | Jilles Tjoelker <jilles@FreeBSD.org> | 2011-03-06 19:50:47 +0000 |
---|---|---|
committer | Jilles Tjoelker <jilles@FreeBSD.org> | 2011-03-06 19:50:47 +0000 |
commit | de555084834b10902e8333fdd76c93fa6f71be03 (patch) | |
tree | 7aaa71e2355dcbf9728fcac1d7dc084775764b64 /usr.bin/killall | |
parent | a9cf49ab39a0906ecfb1e964190da1964805fac9 (diff) | |
download | src-de555084834b10902e8333fdd76c93fa6f71be03.tar.gz src-de555084834b10902e8333fdd76c93fa6f71be03.zip |
Simplify various code that allowed for sys_signame being lower case.
This was changed in r218285.
Notes
Notes:
svn path=/head/; revision=219347
Diffstat (limited to 'usr.bin/killall')
-rw-r--r-- | usr.bin/killall/killall.c | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/usr.bin/killall/killall.c b/usr.bin/killall/killall.c index 2342a32aac86..28496a001e7d 100644 --- a/usr.bin/killall/killall.c +++ b/usr.bin/killall/killall.c @@ -60,18 +60,6 @@ usage(void) exit(1); } -static char * -upper(const char *str) -{ - static char buf[80]; - char *s; - - strlcpy(buf, str, sizeof(buf)); - for (s = buf; *s; s++) - *s = toupper((unsigned char)*s); - return buf; -} - static void printsig(FILE *fp) @@ -81,7 +69,7 @@ printsig(FILE *fp) int offset = 0; for (cnt = NSIG, p = sys_signame + 1; --cnt; ++p) { - offset += fprintf(fp, "%s ", upper(*p)); + offset += fprintf(fp, "%s ", *p); if (offset >= 75 && cnt > 1) { offset = 0; fprintf(fp, "\n"); @@ -401,14 +389,13 @@ main(int ac, char **av) thiscmd, thispid, thistdev, thisuid); if (vflag || sflag) - printf("kill -%s %d\n", upper(sys_signame[sig]), - thispid); + printf("kill -%s %d\n", sys_signame[sig], thispid); killed++; if (!dflag && !sflag) { if (kill(thispid, sig) < 0 /* && errno != ESRCH */ ) { warn("warning: kill -%s %d", - upper(sys_signame[sig]), thispid); + sys_signame[sig], thispid); errors = 1; } } |