svn commit: r246253 - stable/9/libexec/tftpd

Antoine Brodin antoine at FreeBSD.org
Sat Feb 2 13:47:35 UTC 2013


Author: antoine
Date: Sat Feb  2 13:47:34 2013
New Revision: 246253
URL: http://svnweb.freebsd.org/changeset/base/246253

Log:
  MFC r244686 to stable/9:
  Use correct size in snprintf.
  Remove unused buffer.
  
  PR:		174631
  Submitted by:	Henning Petersen

Modified:
  stable/9/libexec/tftpd/tftp-io.c
Directory Properties:
  stable/9/libexec/tftpd/   (props changed)

Modified: stable/9/libexec/tftpd/tftp-io.c
==============================================================================
--- stable/9/libexec/tftpd/tftp-io.c	Sat Feb  2 12:52:43 2013	(r246252)
+++ stable/9/libexec/tftpd/tftp-io.c	Sat Feb  2 13:47:34 2013	(r246253)
@@ -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);
 }
 


More information about the svn-src-all mailing list