summaryrefslogtreecommitdiffstats
path: root/Parser/grammar1.c
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2001-12-04 03:36:01 (GMT)
committerTim Peters <tim.peters@gmail.com>2001-12-04 03:36:01 (GMT)
commit88e138c84221e8473ff789dd4990ae2831e95338 (patch)
treedf27f12d9d77526f1234c259ca677227785718a0 /Parser/grammar1.c
parent1ca12961579c6a27597fc95b610b01af37734827 (diff)
downloadcpython-88e138c84221e8473ff789dd4990ae2831e95338.zip
cpython-88e138c84221e8473ff789dd4990ae2831e95338.tar.gz
cpython-88e138c84221e8473ff789dd4990ae2831e95338.tar.bz2
PyGrammar_LabelRepr(): sprintf -> PyOS_snprintf.
Diffstat (limited to 'Parser/grammar1.c')
-rw-r--r--Parser/grammar1.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Parser/grammar1.c b/Parser/grammar1.c
index 912d387..b76719a 100644
--- a/Parser/grammar1.c
+++ b/Parser/grammar1.c
@@ -39,7 +39,7 @@ PyGrammar_LabelRepr(label *lb)
return "EMPTY";
else if (ISNONTERMINAL(lb->lb_type)) {
if (lb->lb_str == NULL) {
- sprintf(buf, "NT%d", lb->lb_type);
+ PyOS_snprintf(buf, sizeof(buf), "NT%d", lb->lb_type);
return buf;
}
else
@@ -49,7 +49,7 @@ PyGrammar_LabelRepr(label *lb)
if (lb->lb_str == NULL)
return _PyParser_TokenNames[lb->lb_type];
else {
- sprintf(buf, "%.32s(%.32s)",
+ PyOS_snprintf(buf, sizeof(buf), "%.32s(%.32s)",
_PyParser_TokenNames[lb->lb_type], lb->lb_str);
return buf;
}