summaryrefslogtreecommitdiff
path: root/src/libstrongswan/settings.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstrongswan/settings.c')
-rw-r--r--src/libstrongswan/settings.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/libstrongswan/settings.c b/src/libstrongswan/settings.c
index 4a822bcbf..610e2b8ea 100644
--- a/src/libstrongswan/settings.c
+++ b/src/libstrongswan/settings.c
@@ -21,8 +21,8 @@
#include "settings.h"
-#include <debug.h>
-#include <utils/linked_list.h>
+#include "debug.h"
+#include "utils/linked_list.h"
typedef struct private_settings_t private_settings_t;
@@ -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)
{
@@ -497,7 +497,7 @@ static section_t* parse_section(char **text, char *name)
continue;
}
}
- DBG1("matching '}' not found near %s", *text);
+ DBG1(DBG_LIB, "matching '}' not found near %s", *text);
break;
case '=':
if (parse(text, "\t ", "\n", NULL, &value))
@@ -508,7 +508,7 @@ static section_t* parse_section(char **text, char *name)
section->kv->insert_last(section->kv, kv);
continue;
}
- DBG1("parsing value failed near %s", *text);
+ DBG1(DBG_LIB, "parsing value failed near %s", *text);
break;
case '#':
parse(text, "", "\n", NULL, &value);
@@ -566,7 +566,7 @@ settings_t *settings_create(char *file)
fd = fopen(file, "r");
if (fd == NULL)
{
- DBG1("'%s' does not exist or is not readable", file);
+ DBG1(DBG_LIB, "'%s' does not exist or is not readable", file);
return &this->public;
}
fseek(fd, 0, SEEK_END);