Skip to content

Commit

Permalink
ASN.1: fix open failure check on headername
Browse files Browse the repository at this point in the history
The check for a failed open on headername is incorrectly checking
on the out FILE pointer rather than the hdr. Fix this.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: David Howells <dhowells@redhat.com>
  • Loading branch information
Colin Ian King authored and dhowells committed Apr 6, 2016
1 parent 8d4a2ec commit 952cca6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/asn1_compiler.c
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,7 @@ int main(int argc, char **argv)
}

hdr = fopen(headername, "w");
if (!out) {
if (!hdr) {
perror(headername);
exit(1);
}
Expand Down

0 comments on commit 952cca6

Please sign in to comment.