1
0
Fork 0
forked from poz/modfetch

Compare commits

..

No commits in common. "9361c686111ab82bcb550562486e7af54b2fe447" and "771680ac17a24b32694c34116fddc7f245ba1294" have entirely different histories.

View file

@ -1,6 +1,5 @@
#include <ctype.h>
#include <dlfcn.h>
#include <errno.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
@ -110,7 +109,6 @@ char *resolve_env_vars(const char *str) {
ret[ret_offset] = str[i];
ret_offset += 1;
}
ret[ret_offset] = '\0';
return ret;
}
@ -142,9 +140,6 @@ Config parse_config(FILE *config_file) {
.module_count = 0,
};
// TODO handle errors of all the function inside the while
errno = 0;
// TODO rewrite this to read the config char by char
while ((read = getline(&line, &len, config_file)) != -1) {
if (read <= 1)
@ -205,8 +200,6 @@ Config parse_config(FILE *config_file) {
free(line);
}
if (read == -1 && errno != 0)
free(line);
return config;
}