diff options
author | Bruce Momjian | 2007-01-29 20:22:35 +0000 |
---|---|---|
committer | Bruce Momjian | 2007-01-29 20:22:35 +0000 |
commit | dccec51f53012b6ad901c0d0164ceec1a2f9f93f (patch) | |
tree | 462c7cec8ae98c8884fa7f36ea83721487c93829 | |
parent | 1ec50b255b989141bf93b0249a0d0d4dbd83513c (diff) |
Use sizeof() for snprintf() buffer length.
-rw-r--r-- | src/port/exec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/port/exec.c b/src/port/exec.c index c8af5b7e57..aca08cef68 100644 --- a/src/port/exec.c +++ b/src/port/exec.c @@ -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); |