aboutsummaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
authorNAKAMURA Takumi <geek4civic@gmail.com>2012-11-02 01:32:02 +0000
committerNAKAMURA Takumi <geek4civic@gmail.com>2012-11-02 01:32:02 +0000
commit875618f2459f7e3b4234ee29a4e3ed0d48e3ab92 (patch)
tree75631f97c1e1bd8f3529f5968399a16a7cccea77 /runtime
parent9b25ff66dd1aff9f745fa0fa08e7130c942aec86 (diff)
downloadexternal_llvm-875618f2459f7e3b4234ee29a4e3ed0d48e3ab92.zip
external_llvm-875618f2459f7e3b4234ee29a4e3ed0d48e3ab92.tar.gz
external_llvm-875618f2459f7e3b4234ee29a4e3ed0d48e3ab92.tar.bz2
libprofile/CommonProfiling.c: Fix according to C89.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167272 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'runtime')
-rw-r--r--runtime/libprofile/CommonProfiling.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/libprofile/CommonProfiling.c b/runtime/libprofile/CommonProfiling.c
index 058270b..8f4119c 100644
--- a/runtime/libprofile/CommonProfiling.c
+++ b/runtime/libprofile/CommonProfiling.c
@@ -36,10 +36,10 @@ static const char *OutputFilename = "llvmprof.out";
* variable is set. If it is then save it and set OutputFilename.
*/
static void check_environment_variable(void) {
+ const char *EnvVar;
if (SavedEnvVar) return; /* Guarantee that we can't leak memory. */
- const char *EnvVar = getenv("LLVMPROF_OUTPUT");
- if (EnvVar) {
+ if ((EnvVar = getenv("LLVMPROF_OUTPUT")) != NULL) {
/* The string that getenv returns is allowed to be statically allocated,
* which means it may be changed by future calls to getenv, so copy it.
*/