# HG changeset patch # User Matti Hamalainen # Date 1337884409 -10800 # Node ID 966c521e09546fa2cb560cac6b10058d155546dc # Parent a9b20b31cae11a3edab5aae430b2e4b74eac8dc8 Rename user home directory variable. diff -r a9b20b31cae1 -r 966c521e0954 main.c --- a/main.c Thu May 24 20:57:06 2012 +0300 +++ b/main.c Thu May 24 21:33:29 2012 +0300 @@ -1614,7 +1614,7 @@ int histPos = 0, histMax = 0; cfgitem_t *tmpcfg; - char *homeDir = NULL; + char *setHomeDir = NULL; memset(histBuf, 0, sizeof(histBuf)); @@ -1674,18 +1674,18 @@ { char tmpPath[MAX_PATH]; if (SHGetFolderPath(NULL, CSIDL_APPDATA | CSIDL_FLAG_CREATE, NULL, 0, tmpPath) == S_OK) - homeDir = th_strdup(tmpPath); + setHomeDir = th_strdup(tmpPath); CoInitializeEx(NULL, COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE); } #else - homeDir = th_strdup(getenv("HOME")); + setHomeDir = th_strdup(getenv("HOME")); #endif - if (homeDir != NULL) + if (setHomeDir != NULL) { FILE *cfgfile; - setConfigFile = th_strdup_printf("%s" SET_DIR_SEPARATOR "%s", homeDir, SET_CONFIG_FILE); + setConfigFile = th_strdup_printf("%s" SET_DIR_SEPARATOR "%s", setHomeDir, SET_CONFIG_FILE); THMSG(0, "Reading configuration from '%s'.\n", setConfigFile); @@ -2296,7 +2296,7 @@ // Shutdown err_exit: th_cfg_free(cfg); - th_free(homeDir); + th_free(setHomeDir); th_llist_free_func(setIdleMessages, th_free); nn_userhash_free(nnUsers); nn_editbuf_free(editBuf);