diff options
author | 2007-04-06 20:29:18 +0000 | |
---|---|---|
committer | 2007-04-06 20:29:18 +0000 | |
commit | 292bd7ed26282d33c33320fa8ea409b0be28257c (patch) | |
tree | c4a254b4d5e2b89b0d0ccb4b3b8667d0f990be33 /usr.bin/sendbug/sendbug.c | |
parent | Implement "bgpctl show neighbor <peer> terse" this will print all statistics (diff) | |
download | wireguard-openbsd-292bd7ed26282d33c33320fa8ea409b0be28257c.tar.xz wireguard-openbsd-292bd7ed26282d33c33320fa8ea409b0be28257c.zip |
Don't shadow variables. Enable -Wshadow.
Diffstat (limited to 'usr.bin/sendbug/sendbug.c')
-rw-r--r-- | usr.bin/sendbug/sendbug.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/usr.bin/sendbug/sendbug.c b/usr.bin/sendbug/sendbug.c index 6a1a555ba2c..151147b8e99 100644 --- a/usr.bin/sendbug/sendbug.c +++ b/usr.bin/sendbug/sendbug.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sendbug.c,v 1.37 2007/04/06 07:24:53 ray Exp $ */ +/* $OpenBSD: sendbug.c,v 1.38 2007/04/06 20:29:18 ray Exp $ */ /* * Written by Ray Lai <ray@cyth.net>. @@ -217,7 +217,7 @@ dmesg(FILE *fp) } int -editit(char *tmpfile) +editit(char *pathname) { char *argp[] = {"sh", "-c", NULL, NULL}, *ed, *p; sig_t sighup, sigint, sigquit; @@ -229,7 +229,7 @@ editit(char *tmpfile) ed = getenv("EDITOR"); if (ed == NULL || ed[0] == '\0') ed = _PATH_VI; - if (asprintf(&p, "%s %s", ed, tmpfile) == -1) + if (asprintf(&p, "%s %s", ed, pathname) == -1) return (-1); argp[2] = p; @@ -294,38 +294,38 @@ prompt(void) } int -sendmail(const char *tmppath) +sendmail(const char *pathname) { int filedes[2]; if (pipe(filedes) == -1) { - warn("pipe: unsent report in %s", tmppath); + warn("pipe: unsent report in %s", pathname); return (-1); } switch (fork()) { case -1: warn("fork error: unsent report in %s", - tmppath); + pathname); return (-1); case 0: close(filedes[1]); if (dup2(filedes[0], STDIN_FILENO) == -1) { warn("dup2 error: unsent report in %s", - tmppath); + pathname); return (-1); } close(filedes[0]); execl("/usr/sbin/sendmail", "sendmail", "-oi", "-t", (void *)NULL); warn("sendmail error: unsent report in %s", - tmppath); + pathname); return (-1); default: close(filedes[0]); /* Pipe into sendmail. */ - if (send_file(tmppath, filedes[1]) == -1) { + if (send_file(pathname, filedes[1]) == -1) { warn("send_file error: unsent report in %s", - tmppath); + pathname); return (-1); } close(filedes[1]); |