Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

libprofile/CommonProfiling.c: Fix according to C89.

git-svn-id: 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information...
1 parent 9b25ff6 commit 875618f2459f7e3b4234ee29a4e3ed0d48e3ab92 @chapuni chapuni committed
Showing with 2 additions and 2 deletions.
  1. +2 −2 runtime/libprofile/CommonProfiling.c
4 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.

0 comments on commit 875618f

Please sign in to comment.
Something went wrong with that request. Please try again.