Author: antoine
Date: Tue Dec 25 17:06:05 2012
New Revision: 244686
URL: http://svnweb.freebsd.org/changeset/base/244686

Log:
  Use correct size in snprintf.
  Remove unused buffer.
  
  PR:           174631
  Submitted by: Henning Petersen
  MFC after:    1 month

Modified:
  head/libexec/tftpd/tftp-io.c

Modified: head/libexec/tftpd/tftp-io.c
==============================================================================
--- head/libexec/tftpd/tftp-io.c        Tue Dec 25 16:44:50 2012        
(r244685)
+++ head/libexec/tftpd/tftp-io.c        Tue Dec 25 17:06:05 2012        
(r244686)
@@ -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);
 }
 
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to