git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: git@vger.kernel.org
Subject: Re: [RFC/PATCH] transport-helper: initialize debug flag before starting threads
Date: Mon, 8 Dec 2014 05:36:24 -0500	[thread overview]
Message-ID: <20141208103624.GA11737@peff.net> (raw)
In-Reply-To: <20141208082206.GA28302@peff.net>

On Mon, Dec 08, 2014 at 03:22:06AM -0500, Jeff King wrote:

>  /* Print bidirectional transfer loop debug message. */
>  __attribute__((format (printf, 1, 2)))
>  static void transfer_debug(const char *fmt, ...)
>  {
>  	va_list args;
>  	char msgbuf[PBUFFERSIZE];
> -	static int debug_enabled = -1;
>  
> -	if (debug_enabled < 0)
> -		debug_enabled = getenv("GIT_TRANSLOOP_DEBUG") ? 1 : 0;
> -	if (!debug_enabled)
> +	if (!transport_debug_enabled)
>  		return;

I think in my cover letter I made clear that this was not really meant
for inclusion as-is, but just in case: this obviously is missing "()" at
the end of the function call (interestingly gcc -Wall complains, but
clang does not).

-Peff

      reply	other threads:[~2014-12-08 10:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-08  8:22 [RFC/PATCH] transport-helper: initialize debug flag before starting threads Jeff King
2014-12-08 10:36 ` Jeff King [this message]

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=20141208103624.GA11737@peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.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).