summaryrefslogtreecommitdiff
path: root/src/compose
diff options
context:
space:
mode:
authorRan Benita <ran234@gmail.com>2014-10-23 21:00:20 +0300
committerRan Benita <ran234@gmail.com>2014-10-23 21:00:20 +0300
commitc03834a1c61b7e22dbd7d9c8fbe9273032f1dbfb (patch)
treeed63687efaaa563dc47920a8c3c6676a80c9994d /src/compose
parent5e3615b246b240648672515466bd54cd3a2c39a4 (diff)
downloadxorg-lib-libxkbcommon-c03834a1c61b7e22dbd7d9c8fbe9273032f1dbfb.tar.gz
Reduce variable scopes
Signed-off-by: Ran Benita <ran234@gmail.com>
Diffstat (limited to 'src/compose')
-rw-r--r--src/compose/paths.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/compose/paths.c b/src/compose/paths.c
index 8deb1dd..158b4f4 100644
--- a/src/compose/paths.c
+++ b/src/compose/paths.c
@@ -166,8 +166,6 @@ get_home_xcompose_file_path(void)
char *
get_locale_compose_file_path(const char *locale)
{
- int ret;
- const char *xlocaledir;
char *resolved;
char *path;
@@ -193,8 +191,8 @@ get_locale_compose_file_path(const char *locale)
path = resolved;
}
else {
- xlocaledir = get_xlocaledir_path();
- ret = asprintf(&path, "%s/%s", xlocaledir, resolved);
+ const char *xlocaledir = get_xlocaledir_path();
+ int ret = asprintf(&path, "%s/%s", xlocaledir, resolved);
free(resolved);
if (ret < 0)
return NULL;