diff options
author | Ray Lai <ray@cvs.openbsd.org> | 2007-04-07 04:58:51 +0000 |
---|---|---|
committer | Ray Lai <ray@cvs.openbsd.org> | 2007-04-07 04:58:51 +0000 |
commit | d38cab9760f6c9263a0fd8393a67c2ac1b7ef595 (patch) | |
tree | 813ba1d17eea9b1b27bd7075fbc8044989fbc6fb /usr.bin/sendbug/sendbug.c | |
parent | 0298dec4eb2e74946b4d8e3e001799c0bf06aab0 (diff) |
Sprinkle const poison, remove unneeded variable.
Diffstat (limited to 'usr.bin/sendbug/sendbug.c')
-rw-r--r-- | usr.bin/sendbug/sendbug.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/usr.bin/sendbug/sendbug.c b/usr.bin/sendbug/sendbug.c index c849059a565..7cd321aca11 100644 --- a/usr.bin/sendbug/sendbug.c +++ b/usr.bin/sendbug/sendbug.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sendbug.c,v 1.41 2007/04/07 00:40:43 ray Exp $ */ +/* $OpenBSD: sendbug.c,v 1.42 2007/04/07 04:58:50 ray Exp $ */ /* * Written by Ray Lai <ray@cyth.net>. @@ -31,7 +31,7 @@ int checkfile(const char *); void dmesg(FILE *); -int editit(char *); +int editit(const char *); void init(void); int matchline(const char *, const char *, size_t); int prompt(void); @@ -222,11 +222,11 @@ dmesg(FILE *fp) } int -editit(char *pathname) +editit(const char *pathname) { char *argp[] = {"sh", "-c", NULL, NULL}, *ed, *p; sig_t sighup, sigint, sigquit; - pid_t pid, xpid; + pid_t pid; int st; ed = getenv("VISUAL"); @@ -262,8 +262,7 @@ editit(char *pathname) } free(p); for (;;) { - xpid = waitpid(pid, &st, WUNTRACED); - if (xpid == -1) { + if (waitpid(pid, &st, WUNTRACED) == -1) { if (errno != EINTR) return (-1); } else if (WIFSTOPPED(st)) |