summaryrefslogtreecommitdiff
path: root/tuple.c
diff options
context:
space:
mode:
authorHiroshi Inoue2017-06-05 11:52:41 +0000
committerHiroshi Inoue2017-06-07 05:12:45 +0000
commit9636287c7051a4f99b9f79e93f6e7882a635aaed (patch)
tree8e512762123eb3fb5dc665e45ddf8d1a6badfafc /tuple.c
parent43c5333e7f58def0a0cc8adf287186b8fade87c8 (diff)
Clean up the use of sprintf(). Replace sprintf() by snprintf() or the macro SPRINTF_FIXED().
Diffstat (limited to 'tuple.c')
-rw-r--r--tuple.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tuple.c b/tuple.c
index 7c2f53f..6c0f76d 100644
--- a/tuple.c
+++ b/tuple.c
@@ -49,7 +49,7 @@ set_tuplefield_int2(TupleField *tuple_field, Int2 value)
{
char buffer[10];
- sprintf(buffer, "%d", value);
+ ITOA_FIXED(buffer, value);
tuple_field->len = (Int4) (strlen(buffer) + 1);
/* +1 ... is this correct (better be on the save side-...) */
@@ -62,7 +62,7 @@ set_tuplefield_int4(TupleField *tuple_field, Int4 value)
{
char buffer[15];
- sprintf(buffer, "%d", value);
+ ITOA_FIXED(buffer, value);
tuple_field->len = (Int4) (strlen(buffer) + 1);
/* +1 ... is this correct (better be on the save side-...) */