The parsed timeval is unsigned.
authorTobias Brunner <tobias@strongswan.org>
Wed, 3 Mar 2010 16:34:49 +0000 (17:34 +0100)
committerTobias Brunner <tobias@strongswan.org>
Wed, 3 Mar 2010 16:34:49 +0000 (17:34 +0100)
src/libstrongswan/settings.c

index 02ed057..def1d28 100644 (file)
@@ -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)
                        {