diff options
author | Yves-Alexis Perez <corsac@corsac.net> | 2012-06-28 21:16:07 +0200 |
---|---|---|
committer | Yves-Alexis Perez <corsac@corsac.net> | 2012-06-28 21:16:07 +0200 |
commit | b34738ed08c2227300d554b139e2495ca5da97d6 (patch) | |
tree | 62f33b52820f2e49f0e53c0f8c636312037c8054 /src/pluto/defs.c | |
parent | 0a9d51a49042a68daa15b0c74a2b7f152f52606b (diff) | |
download | vyos-strongswan-b34738ed08c2227300d554b139e2495ca5da97d6.tar.gz vyos-strongswan-b34738ed08c2227300d554b139e2495ca5da97d6.zip |
Imported Upstream version 4.6.4
Diffstat (limited to 'src/pluto/defs.c')
-rw-r--r-- | src/pluto/defs.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/pluto/defs.c b/src/pluto/defs.c index f83318e12..7f3a819de 100644 --- a/src/pluto/defs.c +++ b/src/pluto/defs.c @@ -16,6 +16,7 @@ #include <string.h> #include <stdio.h> #include <dirent.h> +#include <inttypes.h> #include <time.h> #include <sys/types.h> #include <sys/stat.h> @@ -91,8 +92,7 @@ mv_chunk(u_char **pos, chunk_t content) const char* check_expiry(time_t expiration_date, int warning_interval, bool strict) { - time_t now; - int time_left; + time_t now, time_left; if (expiration_date == UNDEFINED_TIME) return "ok (expires never)"; @@ -125,8 +125,8 @@ check_expiry(time_t expiration_date, int warning_interval, bool strict) time_left /= 60; unit = "minute"; } - snprintf(buf, 35, "warning (expires in %d %s%s)", time_left, - unit, (time_left == 1)?"":"s"); + snprintf(buf, 35, "warning (expires in %" PRIu64 " %s%s)", + (u_int64_t)time_left, unit, (time_left == 1) ? "" : "s"); return buf; } } |