Skip to content
Snippets Groups Projects
Commit b465d6dc authored by Sean Davis's avatar Sean Davis
Browse files

Reduce variable scope

parent b4a71cf0
No related branches found
No related tags found
No related merge requests found
......@@ -183,7 +183,7 @@ error:
char *
xdg_user_dir_lookup (const char *type)
{
char *dir, *home_dir, *user_dir;
char *dir, *home_dir;
dir = xdg_user_dir_lookup_with_fallback (type, NULL);
if (dir != NULL)
......@@ -196,7 +196,7 @@ xdg_user_dir_lookup (const char *type)
/* Special case desktop for historical compatibility */
if (strcmp(type, "DESKTOP") == 0) {
user_dir = (char *) malloc (strlen (home_dir) + strlen ("/Desktop") + 1);
char *user_dir = (char *) malloc (strlen (home_dir) + strlen ("/Desktop") + 1);
if (user_dir == NULL)
return NULL;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment