Use NULL instead of 0 for pointers.
fopen(3) will return NULL in case it can't open the STREAM.
This commit is contained in:
parent
27f4c84ae1
commit
5b2a866b97
@ -2008,7 +2008,7 @@ load_xilinx(char *name)
|
||||
int c;
|
||||
|
||||
if (verbose) printf("Load firmware from file %s...\n", name);
|
||||
if ((f = fopen(name, "r")) == 0)
|
||||
if ((f = fopen(name, "r")) == NULL)
|
||||
{
|
||||
perror("Failed to open file");
|
||||
exit(1);
|
||||
|
Loading…
Reference in New Issue
Block a user