Mercurial > pidgin
changeset 16368:d13f39e18160
There's no need to recalculate the home_dir on every call to
purple_user_dir() when we are already storing it in a variable anyway.
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Mon, 23 Apr 2007 17:06:43 +0000 |
parents | 6a9ae99e7050 |
children | f64566c2eefc |
files | libpurple/util.c |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/util.c Mon Apr 23 17:05:54 2007 +0000 +++ b/libpurple/util.c Mon Apr 23 17:06:43 2007 +0000 @@ -65,7 +65,7 @@ }; static char custom_home_dir[MAXPATHLEN]; -static char home_dir[MAXPATHLEN]; +static char home_dir[MAXPATHLEN] = ""; PurpleMenuAction * purple_menu_action_new(const char *label, PurpleCallback callback, gpointer data, @@ -2251,7 +2251,7 @@ { if (custom_home_dir != NULL && *custom_home_dir) { strcpy ((char*) &home_dir, (char*) &custom_home_dir); - } else { + } else if (!*home_dir) { const gchar *hd = purple_home_dir(); if (hd) {