summaryrefslogtreecommitdiff
path: root/src/backend/utils/error/elog.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/utils/error/elog.c')
-rw-r--r--src/backend/utils/error/elog.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/backend/utils/error/elog.c b/src/backend/utils/error/elog.c
index 868db0907e7..763024b5773 100644
--- a/src/backend/utils/error/elog.c
+++ b/src/backend/utils/error/elog.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/error/elog.c,v 1.106 2003/01/07 22:23:17 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/error/elog.c,v 1.107 2003/03/20 03:34:56 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -215,7 +215,8 @@ elog(int lev, const char *fmt,...)
* Prints the failure line of the COPY. Wow, what a hack! bjm
* Translator: Error message will be truncated at 31 characters.
*/
- snprintf(copylineno_buf, 32, gettext("copy: line %d, "), copy_lineno);
+ snprintf(copylineno_buf, sizeof(copylineno_buf),
+ gettext("copy: line %d, "), copy_lineno);
space_needed += strlen(copylineno_buf);
}
@@ -787,8 +788,8 @@ useful_strerror(int errnum)
* translator: This string will be truncated at 47 characters
* expanded.
*/
- snprintf(errorstr_buf, 48, gettext("operating system error %d"),
- errnum);
+ snprintf(errorstr_buf, sizeof(errorstr_buf),
+ gettext("operating system error %d"), errnum);
str = errorstr_buf;
}