From: Max Kellermann Date: Fri, 8 Nov 2013 18:36:49 +0000 (+0100) Subject: conf: convert runtime check to assertion X-Git-Tag: v0.22~18 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=64f78d37e209949b03a30dc1964479f80c43d9a9;p=ncmpc.git conf: convert runtime check to assertion --- diff --git a/src/conf.c b/src/conf.c index 0166f6f..87dd310 100644 --- a/src/conf.c +++ b/src/conf.c @@ -25,6 +25,7 @@ #include "colors.h" #include "screen_list.h" +#include #include #include #include @@ -565,12 +566,11 @@ parse_line(char *line) static int read_rc_file(char *filename) { + assert(filename != NULL); + FILE *file; char line[MAX_LINE_LENGTH]; - if (filename == NULL) - return -1; - file = fopen(filename, "r"); if (file == NULL) { perror(filename);