diff options
author | Raphaƫl Moll <ralf@android.com> | 2011-05-04 14:57:39 -0700 |
---|---|---|
committer | Android Code Review <code-review@android.com> | 2011-05-04 14:57:39 -0700 |
commit | 3025eac67d835cb41c38564b31bb910e2bfe63a5 (patch) | |
tree | 2a04b4d6238f0f6d5f554ddba9b37d84c4d1d0bf | |
parent | d0f48c07a5bc47fb461aa5dc4e41e8d6798c8ccc (diff) | |
parent | 83bc92d90df040916d26d5ab9cd7c753939f51b0 (diff) | |
download | external_qemu-3025eac67d835cb41c38564b31bb910e2bfe63a5.zip external_qemu-3025eac67d835cb41c38564b31bb910e2bfe63a5.tar.gz external_qemu-3025eac67d835cb41c38564b31bb910e2bfe63a5.tar.bz2 |
Merge "Merge "Fix ANDROID_SDK_HOME handling."" into tools_r11
-rw-r--r-- | android/avd/util.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/android/avd/util.c b/android/avd/util.c index fdeb0fe..2ba4117 100644 --- a/android/avd/util.c +++ b/android/avd/util.c @@ -100,19 +100,12 @@ path_getRootIniPath( const char* avdName ) char* path_getSdkHome(void) { - const char* sdkHome = getenv("ANDROID_SDK_HOME"); - - if (sdkHome == NULL || *sdkHome == '\0') { - char temp[PATH_MAX], *p=temp, *end=p+sizeof(temp); - p = bufprint_config_path(temp, end); - if (p >= end) { - APANIC("User path too long!: %s\n", temp); - } - sdkHome = strdup(temp); - } else { - sdkHome = strdup(sdkHome); + char temp[PATH_MAX], *p=temp, *end=p+sizeof(temp); + p = bufprint_config_path(temp, end); + if (p >= end) { + APANIC("User path too long!: %s\n", temp); } - return (char*)sdkHome; + return strdup(temp); } |