From: Daniel Juyung Seo Date: Sat, 3 May 2014 21:18:44 +0000 (+0900) Subject: theme: removed unnecessary null check. X-Git-Tag: v1.10.0-beta1~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6bfe6020cc3a8f720cb326096649fbc74e7d5308;p=platform%2Fupstream%2Felementary.git theme: removed unnecessary null check. Null check is already done in the previous line so do not check null again. --- diff --git a/src/lib/elm_theme.c b/src/lib/elm_theme.c index bf77c3f..c35d374 100644 --- a/src/lib/elm_theme.c +++ b/src/lib/elm_theme.c @@ -971,11 +971,10 @@ elm_theme_system_dir_get(void) char buf[PATH_MAX]; if (path) return path; - if (!path) - { - snprintf(buf, sizeof(buf), "%s/themes", _elm_data_dir); - path = strdup(buf); - } + + snprintf(buf, sizeof(buf), "%s/themes", _elm_data_dir); + path = strdup(buf); + return path; } @@ -986,13 +985,12 @@ elm_theme_user_dir_get(void) char buf[PATH_MAX]; if (path) return path; - if (!path) - { - char *home = getenv("HOME"); - if (!home) home = ""; - snprintf(buf, sizeof(buf), "%s/"ELEMENTARY_BASE_DIR"/themes", home); - path = strdup(buf); - } + char *home = getenv("HOME"); + if (!home) home = ""; + + snprintf(buf, sizeof(buf), "%s/"ELEMENTARY_BASE_DIR"/themes", home); + path = strdup(buf); + return path; }