llvm.org GIT mirror llvm / 875618f
libprofile/CommonProfiling.c: Fix according to C89. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167272 91177308-0d34-0410-b5e6-96231b3b80d8 NAKAMURA Takumi 8 years ago
1 changed file(s) with 2 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
3535 * variable is set. If it is then save it and set OutputFilename.
3636 */
3737 static void check_environment_variable(void) {
38 const char *EnvVar;
3839 if (SavedEnvVar) return; /* Guarantee that we can't leak memory. */
3940
40 const char *EnvVar = getenv("LLVMPROF_OUTPUT");
41 if (EnvVar) {
41 if ((EnvVar = getenv("LLVMPROF_OUTPUT")) != NULL) {
4242 /* The string that getenv returns is allowed to be statically allocated,
4343 * which means it may be changed by future calls to getenv, so copy it.
4444 */