ASN.1: fix open failure check on headername
authorColin Ian King <colin.king@canonical.com>
Wed, 6 Apr 2016 13:06:48 +0000 (14:06 +0100)
committerDavid Howells <dhowells@redhat.com>
Wed, 6 Apr 2016 13:06:48 +0000 (14:06 +0100)
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>
scripts/asn1_compiler.c

index e000f44e37b8775f45023464b765a460d92d1204..c1b7ef3e24c1c055cc90d1e986b11308ff7d2e02 100644 (file)
@@ -650,7 +650,7 @@ int main(int argc, char **argv)
        }
 
        hdr = fopen(headername, "w");
-       if (!out) {
+       if (!hdr) {
                perror(headername);
                exit(1);
        }
This page took 0.02487 seconds and 5 git commands to generate.