diff options
author | Vladislav Grishenko <themiron@mail.ru> | 2019-01-19 03:27:40 +0500 |
---|---|---|
committer | Vladislav Grishenko <themiron@mail.ru> | 2019-01-19 03:33:13 +0500 |
commit | 5fc1391e534ec9728b03bf4fdcfe8686720547d0 (patch) | |
tree | 0a4c2ef6c7768804bd33edd7728a8e725b3897e9 /accel-pppd | |
parent | 2910add2238d419ad82e43f3ebf1fb8d5708e13b (diff) | |
download | accel-ppp-5fc1391e534ec9728b03bf4fdcfe8686720547d0.tar.gz accel-ppp-5fc1391e534ec9728b03bf4fdcfe8686720547d0.zip |
ipoe/cli: fix build warnings
Diffstat (limited to 'accel-pppd')
-rw-r--r-- | accel-pppd/cli/show_sessions.c | 6 | ||||
-rw-r--r-- | accel-pppd/ctrl/ipoe/ipoe.c | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/accel-pppd/cli/show_sessions.c b/accel-pppd/cli/show_sessions.c index 0ea3c94e..10e16b13 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); } diff --git a/accel-pppd/ctrl/ipoe/ipoe.c b/accel-pppd/ctrl/ipoe/ipoe.c index eb06e7b7..6155ccb3 100644 --- a/accel-pppd/ctrl/ipoe/ipoe.c +++ b/accel-pppd/ctrl/ipoe/ipoe.c @@ -1514,7 +1514,7 @@ static void ipoe_serv_disc_timer(struct triton_timer_t *t) { struct ipoe_serv *serv = container_of(t, typeof(*serv), disc_timer); struct timespec ts; - int delay, delay1 = INT_MAX, delay2 = INT_MAX, offer_delay; + int delay, delay1 = INT_MAX, delay2 = INT_MAX, offer_delay = 0; clock_gettime(CLOCK_MONOTONIC, &ts); |