Fixed minor warning and improved an error message
This commit is contained in:
parent
16d1fd9788
commit
44ea513b9f
6
Makefile
6
Makefile
|
@ -51,10 +51,10 @@ build/release/objs/ConfigParse.o: src/ConfigParse.c src/ConfigParse.h
|
|||
$(CC) $(FLAGS_RELEASE) -o $(OBJ_RELEASE_CFGP) -c src/ConfigParse.c
|
||||
|
||||
clean-all:
|
||||
rm $(OBJS_DEBUG) $(OBJS_RELEASE) $(BINARY)
|
||||
-rm -f $(OBJS_DEBUG) $(OBJS_RELEASE) $(BINARY)
|
||||
|
||||
clean-release:
|
||||
rm $(OBJS_RELEASE) $(BINARY)
|
||||
-rm -f $(OBJS_RELEASE) $(BINARY)
|
||||
|
||||
clean-debug:
|
||||
rm $(OBJS_DEBUG) $(BINARY)
|
||||
-rm -f $(OBJS_DEBUG) $(BINARY)
|
||||
|
|
|
@ -32,7 +32,7 @@ void cfgsection_load(FILE* fconfig, section_t* cfg, char* section_name) {
|
|||
strcat(snamestr, section_name);
|
||||
strcat(snamestr, "]");
|
||||
|
||||
uint32_t nbytes = 0;
|
||||
size_t nbytes = 0;
|
||||
char* gotline = NULL;
|
||||
char* delim = "=\n";
|
||||
char* delim2 = "\n";
|
||||
|
|
|
@ -45,7 +45,8 @@ int main(int argc, char* argv[]) {
|
|||
|
||||
FILE* fconfig = fopen("/etc/w3panik/w3panik.conf", "r");
|
||||
if (fconfig == NULL) {
|
||||
perror("Fatal error");
|
||||
perror("Fatal error while trying to read configuration file");
|
||||
fprintf(stderr, "Check for its presence at '/etc/w3panik/w3panik.conf' and try again.");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
section_t* options = config_init();
|
||||
|
|
Loading…
Reference in New Issue