diff options
author | antoine <antoine@FreeBSD.org> | 2012-12-25 17:06:05 +0000 |
---|---|---|
committer | antoine <antoine@FreeBSD.org> | 2012-12-25 17:06:05 +0000 |
commit | 155ea9795fc53fbeb8fa3c1402f7eacb6eed5e86 (patch) | |
tree | 60b741f004b3e8b2939d329c840818aae82ea4e7 /libexec | |
parent | ddd09f2a269f1c2be1177b3d360fa2f844c0bc70 (diff) | |
download | FreeBSD-src-155ea9795fc53fbeb8fa3c1402f7eacb6eed5e86.zip FreeBSD-src-155ea9795fc53fbeb8fa3c1402f7eacb6eed5e86.tar.gz |
Use correct size in snprintf.
Remove unused buffer.
PR: 174631
Submitted by: Henning Petersen
MFC after: 1 month
Diffstat (limited to 'libexec')
-rw-r--r-- | libexec/tftpd/tftp-io.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/libexec/tftpd/tftp-io.c b/libexec/tftpd/tftp-io.c index d5d7fc6..1d4f743 100644 --- a/libexec/tftpd/tftp-io.c +++ b/libexec/tftpd/tftp-io.c @@ -87,14 +87,13 @@ errtomsg(int error) { static char ebuf[40]; struct errmsg *pe; - char buf[MAXPKTSIZE]; if (error == 0) return ("success"); for (pe = errmsgs; pe->e_code >= 0; pe++) if (pe->e_code == error) return (pe->e_msg); - snprintf(ebuf, sizeof(buf), "error %d", error); + snprintf(ebuf, sizeof(ebuf), "error %d", error); return (ebuf); } |