mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
sprintf -> PyOS_snprintf in some "obviously safe" cases.
Also changed <>-style #includes to ""-style in some places where the former didn't make sense.
This commit is contained in:
parent
05bd787c6c
commit
885d457709
15 changed files with 61 additions and 42 deletions
|
@ -25,7 +25,7 @@ can log in on your machine. Use with caution!
|
|||
Python.h defines a typedef destructor, which conflicts with pthread.h.
|
||||
So Python.h must be included after pthread.h. */
|
||||
|
||||
#include <Python.h>
|
||||
#include "Python.h"
|
||||
|
||||
extern int Py_VerboseFlag;
|
||||
|
||||
|
@ -364,6 +364,7 @@ static void
|
|||
ps(void)
|
||||
{
|
||||
char buffer[100];
|
||||
sprintf(buffer, "ps -l -p %d </dev/null | tail +2l\n", getpid());
|
||||
PyOS_snprintf(buffer, sizeof(buffer),
|
||||
"ps -l -p %d </dev/null | tail +2l\n", getpid());
|
||||
system(buffer);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue