git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Dan Weber <dan@mirrorlynx.com>
To: Git Mailing List <git@vger.kernel.org>
Subject: [PATCH] Remove gitenv macro hack
Date: Thu, 19 May 2005 18:01:17 -0400 (EDT)	[thread overview]
Message-ID: <Pine.LNX.4.62.0505191800280.16809@mirrorlynx.com> (raw)


Removed hacky macro for gitenv.  Often produced warnings by the compiler 
for the use of ?: without anything after the ?

Signed-off-by: Dan Weber <dan@mirrorlynx.com>

---
commit 1b48b369a152a6315a9b4e6eebf50f56176cdd82
tree 53c238f3aa788df47325c456ab16b0eb25004074
parent 5cd4c7b7686d334e341b21d92449349feda3ef65
author Dan Weber <dan@mirrorlynx.com> Thu, 19 May 2005 17:57:44 -0400
committer Dan Weber <dan@mirrorlynx.com> Thu, 19 May 2005 17:57:44 -0400

  cache.h |    8 +++++++-
  1 files changed, 7 insertions(+), 1 deletion(-)

Index: cache.h
===================================================================
--- ca5fef50fb68a3afbb35e1a48ac622f7a964f021/cache.h  (mode:100644)
+++ 53c238f3aa788df47325c456ab16b0eb25004074/cache.h  (mode:100644)
@@ -37,7 +37,13 @@
   * We accept older names for now but warn.
   */
  extern char *gitenv_bc(const char *);
-#define gitenv(e) (getenv(e) ? : gitenv_bc(e))
+static inline char* gitenv(const char* name) {
+       char* result = getenv(name);
+       if (result)
+               return result;
+       else
+               return gitenv_bc(name);
+}

  /*
   * Basic data structures for the directory cache


             reply	other threads:[~2005-05-19 22:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-19 22:01 Dan Weber [this message]
2005-05-19 23:41 ` [PATCH] Remove gitenv macro hack Junio C Hamano

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=Pine.LNX.4.62.0505191800280.16809@mirrorlynx.com \
    --to=dan@mirrorlynx.com \
    --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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).