Skip to content

Commit

Permalink
Merge pull request #13 from ktd2004/master
Browse files Browse the repository at this point in the history
fix invalid error check for return of fopen.
  • Loading branch information
wolkykim authored Nov 30, 2016
2 parents bc11ffd + dc423c1 commit c75b47d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/qentry.c
Original file line number Diff line number Diff line change
Expand Up @@ -740,7 +740,7 @@ static bool _save(qentry_t *entry, const char *filepath)
if (entry == NULL) return false;

FILE *fd;
if ((fd = fopen(filepath, "w")) < 0) {
if ((fd = fopen(filepath, "w")) == NULL) {
DEBUG("qentry_t->save(): Can't open file %s", filepath);
return false;
}
Expand Down

0 comments on commit c75b47d

Please sign in to comment.