From: Tobias Brunner Date: Wed, 3 Mar 2010 16:34:49 +0000 (+0100) Subject: The parsed timeval is unsigned. X-Git-Tag: 4.4.0~253 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=465ccdc8cf155d6116db703ae0c0b19057aa7809;p=thirdparty%2Fstrongswan.git The parsed timeval is unsigned. --- diff --git a/src/libstrongswan/settings.c b/src/libstrongswan/settings.c index 02ed05771f..def1d28d43 100644 --- a/src/libstrongswan/settings.c +++ b/src/libstrongswan/settings.c @@ -293,8 +293,8 @@ static u_int32_t get_time(private_settings_t *this, char *key, u_int32_t def, .. if (value) { errno = 0; - timeval = strtol(value, &endptr, 10); - if (errno == 0 && timeval >= 0) + timeval = strtoul(value, &endptr, 10); + if (errno == 0) { switch (*endptr) {