[Python-checkins] CVS: python/dist/src/Python strerror.c,2.10,2.11

Jeremy Hylton jhylton@users.sourceforge.net
2001年11月28日 12:42:03 -0800


Update of /cvsroot/python/python/dist/src/Python
In directory usw-pr-cvs1:/tmp/cvs-serv9875/Python
Modified Files:
	strerror.c 
Log Message:
Use PyOS_snprintf instead of sprintf.
Index: strerror.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/strerror.c,v
retrieving revision 2.10
retrieving revision 2.11
diff -C2 -d -r2.10 -r2.11
*** strerror.c	2000年09月01日 23:29:28	2.10
--- strerror.c	2001年11月28日 20:42:01	2.11
***************
*** 4,7 ****
--- 4,8 ----
 
 #include <stdio.h>
+ #include "Python.h"
 
 extern int sys_nerr;
***************
*** 14,18 ****
 	if (err >= 0 && err < sys_nerr)
 		return sys_errlist[err];
! 	sprintf(buf, "Unknown errno %d", err);
 	return buf;
 }
--- 15,19 ----
 	if (err >= 0 && err < sys_nerr)
 		return sys_errlist[err];
! 	PyOS_snprintf(buf, sizeof(buf), "Unknown errno %d", err);
 	return buf;
 }

AltStyle によって変換されたページ (->オリジナル) /