64bits fixes.
[apps/pfixtools.git] / postlicyd / config.c
index d4131f1..672faca 100644 (file)
@@ -188,7 +188,7 @@ static bool config_load(config_t *config)
 
     char key[BUFSIZ];
     char value[BUFSIZ];
-    ssize_t key_len, value_len;
+    int key_len, value_len;
 
     if (!file_map_open(&map, config->filename, false)) {
         return false;
@@ -200,7 +200,7 @@ static bool config_load(config_t *config)
 
 #define READ_LOG(Lev, Fmt, ...)                                                \
     __log(LOG_ ## Lev, "config file %s:%d:%d: " Fmt, config->filename,         \
-           line + 1, p - linep + 1, ##__VA_ARGS__)
+           line + 1, (int)(p - linep + 1), ##__VA_ARGS__)
 #define READ_ERROR(Fmt, ...)                                                   \
     do {                                                                       \
         READ_LOG(ERR, Fmt, ##__VA_ARGS__);                                     \
@@ -423,7 +423,7 @@ config_t *config_read(const char *file)
     config_t *config = config_new();
     config->filename = file;
     if (!config_reload(config)) {
-        p_delete(&config);
+        config_delete(&config);
         return NULL;
     }
     return config;