Use NULL instead of 0 for pointers.
fopen(3) will return NULL in case it cannot open the STREAM. MFC after: 2 weeks.
This commit is contained in:
parent
b2f244e71e
commit
45973d9d15
@ -129,7 +129,7 @@ dopath(struct input_file *i, const char *filename)
|
||||
|
||||
for (pe = first; pe; pe = pe->next) {
|
||||
snprintf(path, sizeof(path), "%s/%s", pe->name, filename);
|
||||
if ((f = fopen(path, "r")) != 0) {
|
||||
if ((f = fopen(path, "r")) != NULL) {
|
||||
set_input(i, f, path);
|
||||
return i;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user