diff options
-rw-r--r-- | usr.bin/killall/killall.c | 19 | ||||
-rw-r--r-- | usr.bin/truss/main.c | 4 |
2 files changed, 3 insertions, 20 deletions
diff --git a/usr.bin/killall/killall.c b/usr.bin/killall/killall.c index 2342a32..28496a0 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; } } diff --git a/usr.bin/truss/main.c b/usr.bin/truss/main.c index 58ed5d5..e828046 100644 --- a/usr.bin/truss/main.c +++ b/usr.bin/truss/main.c @@ -45,7 +45,6 @@ __FBSDID("$FreeBSD$"); #include <sys/sysctl.h> #include <sys/wait.h> -#include <ctype.h> #include <err.h> #include <errno.h> #include <fcntl.h> @@ -154,12 +153,9 @@ strsig(int sig) ret = NULL; if (sig > 0 && sig < NSIG) { - int i; asprintf(&ret, "SIG%s", sys_signame[sig]); if (ret == NULL) return (NULL); - for (i = 0; ret[i] != '\0'; ++i) - ret[i] = toupper(ret[i]); } return (ret); } |