linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ASN.1: fix open failure check on headername
@ 2016-03-22 22:32 Colin King
  2016-04-06 13:09 ` David Howells
  0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2016-03-22 22:32 UTC (permalink / raw)
  To: David Howells, David Woodhouse; +Cc: linux-kernel

From: Colin Ian King <colin.king@canonical.com>

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>
---
 scripts/asn1_compiler.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/asn1_compiler.c b/scripts/asn1_compiler.c
index e000f44..c1b7ef3 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);
 	}
-- 
2.7.3

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ASN.1: fix open failure check on headername
  2016-03-22 22:32 [PATCH] ASN.1: fix open failure check on headername Colin King
@ 2016-04-06 13:09 ` David Howells
  0 siblings, 0 replies; 2+ messages in thread
From: David Howells @ 2016-04-06 13:09 UTC (permalink / raw)
  To: Colin King; +Cc: dhowells, David Woodhouse, linux-kernel

Colin King <colin.king@canonical.com> wrote:

> From: Colin Ian King <colin.king@canonical.com>
> 
> 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>

Applied, thanks.

David

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-04-06 13:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-22 22:32 [PATCH] ASN.1: fix open failure check on headername Colin King
2016-04-06 13:09 ` David Howells

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).