summaryrefslogtreecommitdiff
path: root/src/port/exec.c
diff options
context:
space:
mode:
authorBruce Momjian2007-01-29 20:22:35 +0000
committerBruce Momjian2007-01-29 20:22:35 +0000
commita6017cff0b376f94ee22eb05374164927d627795 (patch)
treeba5b8fc04eb499e920b66be645504be7bb85bb5a /src/port/exec.c
parent5b4fa959846abf9e95798a39326e56fd7dc27d43 (diff)
Use sizeof() for snprintf() buffer length.
Diffstat (limited to 'src/port/exec.c')
-rw-r--r--src/port/exec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/port/exec.c b/src/port/exec.c
index e92dbde1a29..9ec5ae417ff 100644
--- a/src/port/exec.c
+++ b/src/port/exec.c
@@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/port/exec.c,v 1.54 2007/01/29 20:17:40 momjian Exp $
+ * $PostgreSQL: pgsql/src/port/exec.c,v 1.55 2007/01/29 20:22:35 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -590,7 +590,7 @@ pclose_check(FILE *stream)
{
char str[256];
- snprintf(str, 256, "%d: %s", WTERMSIG(exitstatus),
+ snprintf(str, sizeof(str), "%d: %s", WTERMSIG(exitstatus),
WTERMSIG(exitstatus) < NSIG ?
sys_siglist[WTERMSIG(exitstatus)] : "(unknown)");
log_error(_("child process was terminated by signal %s"), str);