Browse Source

Fix possibly un-initialized variable.

The write_file function could return an un-initialized variable
if the fopen call failed for any reason.
develop
Damien Goutte-Gattat 4 years ago
parent
commit
f556261309
  1. 2
      src/util.c

2
src/util.c

@ -130,7 +130,7 @@ int
write_file(const char *filename, const unsigned char *contents, size_t len)
{
FILE *f;
int rc;
int rc = -1;
assert(filename != NULL);
assert(contents != NULL);

Loading…
Cancel
Save