[geany/geany] c615d8: Don't call getenv twice

Nick Treleaven git-noreply at xxxxx
Thu Aug 15 16:52:13 UTC 2013


Branch:      refs/heads/master
Author:      Nick Treleaven <nick.treleaven at btinternet.com>
Committer:   Nick Treleaven <nick.treleaven at btinternet.com>
Date:        Thu, 15 Aug 2013 16:52:13 UTC
Commit:      c615d8431fa2cf808ec692f1c605834186a39c08
             https://github.com/geany/geany/commit/c615d8431fa2cf808ec692f1c605834186a39c08

Log Message:
-----------
Don't call getenv twice


Modified Paths:
--------------
    src/symbols.c

Modified: src/symbols.c
5 files changed, 4 insertions(+), 1 deletions(-)
===================================================================
@@ -1784,7 +1784,10 @@ int symbols_generate_global_tags(int argc, char **argv, gboolean want_preprocess
 			load_c_ignore_tags();
 
 		if (want_preprocess && (ft->id == GEANY_FILETYPES_C || ft->id == GEANY_FILETYPES_CPP))
-			command = g_strdup_printf("%s %s", pre_process, FALLBACK(getenv("CFLAGS"), ""));
+		{
+			const gchar *cflags = getenv("CFLAGS");
+			command = g_strdup_printf("%s %s", pre_process, FALLBACK(cflags, ""));
+		}
 		else
 			command = NULL;	/* don't preprocess */
 



--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).


More information about the Commits mailing list