From: Colin Ian King Date: Wed, 6 Apr 2016 13:06:48 +0000 (+0100) Subject: ASN.1: fix open failure check on headername X-Git-Url: http://git.efficios.com/?a=commitdiff_plain;h=952cca6a724c420a1efb6025e41862dfd2c1edc3;p=deliverable%2Flinux.git ASN.1: fix open failure check on headername 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 Signed-off-by: David Howells --- diff --git a/scripts/asn1_compiler.c b/scripts/asn1_compiler.c index e000f44e37b8..c1b7ef3e24c1 100644 --- a/scripts/asn1_compiler.c +++ b/scripts/asn1_compiler.c @@ -650,7 +650,7 @@ int main(int argc, char **argv) } hdr = fopen(headername, "w"); - if (!out) { + if (!hdr) { perror(headername); exit(1); }