From 5fc1391e534ec9728b03bf4fdcfe8686720547d0 Mon Sep 17 00:00:00 2001 From: Vladislav Grishenko Date: Sat, 19 Jan 2019 03:27:40 +0500 Subject: ipoe/cli: fix build warnings --- accel-pppd/cli/show_sessions.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'accel-pppd/cli') diff --git a/accel-pppd/cli/show_sessions.c b/accel-pppd/cli/show_sessions.c index 0ea3c94..10e16b1 100644 --- a/accel-pppd/cli/show_sessions.c +++ b/accel-pppd/cli/show_sessions.c @@ -475,7 +475,7 @@ static void print_uptime(struct ap_session *ses, char *buf) { time_t uptime; int day,hour,min,sec; - char time_str[14]; + char time_str[24]; if (ses->stop_time) uptime = ses->stop_time - ses->start_time; @@ -489,9 +489,9 @@ static void print_uptime(struct ap_session *ses, char *buf) min = uptime / 60; sec = uptime % 60; if (day) - snprintf(time_str, 13, "%i.%02i:%02i:%02i", day, hour, min, sec); + snprintf(time_str, sizeof(time_str), "%i.%02i:%02i:%02i", day, hour, min, sec); else - snprintf(time_str, 13, "%02i:%02i:%02i", hour, min, sec); + snprintf(time_str, sizeof(time_str), "%02i:%02i:%02i", hour, min, sec); sprintf(buf, "%s", time_str); } -- cgit v1.2.3