summaryrefslogtreecommitdiffstats
path: root/Modules/gdbmmodule.c
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2001-11-28 20:27:42 (GMT)
committerTim Peters <tim.peters@gmail.com>2001-11-28 20:27:42 (GMT)
commit885d457709c1d680c899dc3d035a47c8fb514cfa (patch)
treed16b3a6f89208a1b46b786958a316ef9075d3fab /Modules/gdbmmodule.c
parent05bd787c6cd55f29d43465de621778221e0fc46e (diff)
downloadcpython-885d457709c1d680c899dc3d035a47c8fb514cfa.zip
cpython-885d457709c1d680c899dc3d035a47c8fb514cfa.tar.gz
cpython-885d457709c1d680c899dc3d035a47c8fb514cfa.tar.bz2
sprintf -> PyOS_snprintf in some "obviously safe" cases.
Also changed <>-style #includes to ""-style in some places where the former didn't make sense.
Diffstat (limited to 'Modules/gdbmmodule.c')
-rw-r--r--Modules/gdbmmodule.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Modules/gdbmmodule.c b/Modules/gdbmmodule.c
index 0190a9b..505ce92 100644
--- a/Modules/gdbmmodule.c
+++ b/Modules/gdbmmodule.c
@@ -477,7 +477,8 @@ dbmopen(PyObject *self, PyObject *args)
break;
#endif
default:
- sprintf(buf, "Flag '%c' is not supported.", *flags);
+ PyOS_snprintf(buf, sizeof(buf), "Flag '%c' is not supported.",
+ *flags);
PyErr_SetString(DbmError, buf);
return NULL;
}