[Python-checkins] CVS: python/dist/src/Python strerror.c,2.10,2.11
Jeremy Hylton
jhylton@users.sourceforge.net
Wed, 28 Nov 2001 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;
}