linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Nathan_Lynch@mentor.com (Nathan Lynch)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: fix vdsomunge not to depend on glibc specific error.h
Date: Wed, 1 Jul 2015 17:29:13 -0500	[thread overview]
Message-ID: <559469B9.3000301@mentor.com> (raw)
In-Reply-To: <20150701222713.GO7557@n2100.arm.linux.org.uk>

On 07/01/2015 05:27 PM, Russell King - ARM Linux wrote:
> On Tue, Jun 30, 2015 at 11:48:29AM +0100, Szabolcs Nagy wrote:
>> @@ -82,11 +80,25 @@
>>  #define EF_ARM_ABI_FLOAT_HARD 0x400
>>  #endif
>>
>> +static int failed;
>> +static const char *argv0;
>>  static const char *outfile;
>>
>> +static void fail(const char *fmt, ...)
>> +{
>> +	va_list ap;
>> +
>> +	failed = 1;
>> +	fprintf(stderr, "%s: ", argv0);
>> +	va_start(ap, fmt);
>> +	vfprintf(stderr, fmt, ap);
>> +	va_end(ap);
>> +	exit(EXIT_FAILURE);
> 
> What purpose does "failed" serve?  Reading through this patch, it
> seems to be a write-only variable.

It's checked in an atexit handler:

 static void cleanup(void)
 {
-	if (error_message_count > 0 && outfile != NULL)
+	if (failed && outfile != NULL)
 		unlink(outfile);
 }

  reply	other threads:[~2015-07-01 22:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-30 10:48 [PATCH] ARM: fix vdsomunge not to depend on glibc specific error.h Szabolcs Nagy
2015-06-30 11:05 ` Will Deacon
2015-07-01 22:11   ` Nathan Lynch
2015-07-01 22:27 ` Russell King - ARM Linux
2015-07-01 22:29   ` Nathan Lynch [this message]
2015-07-01 22:30     ` Russell King - ARM Linux

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=559469B9.3000301@mentor.com \
    --to=nathan_lynch@mentor.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).