From: Adam Sampson Date: Thu, 15 Sep 2016 15:54:42 +0000 (+0100) Subject: Use sizeof rather than hardcoding snprintf's size argument. X-Git-Tag: 4.5~40^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=924cc346475dea7dc394316cd7c3d5d0414e538e;p=shadow Use sizeof rather than hardcoding snprintf's size argument. --- diff --git a/src/su.c b/src/su.c index 93ffd2fb..d605af8e 100644 --- a/src/su.c +++ b/src/su.c @@ -373,8 +373,8 @@ static void prepare_pam_close_session (void) stderr); (void) kill (-pid_child, caught); - snprintf (kill_msg, 256, _(" ...killed.\n")); - snprintf (wait_msg, 256, _(" ...waiting for child to terminate.\n")); + snprintf (kill_msg, sizeof kill_msg, _(" ...killed.\n")); + snprintf (wait_msg, sizeof wait_msg, _(" ...waiting for child to terminate.\n")); (void) signal (SIGALRM, kill_child); (void) alarm (2);