diff options
author | Colin Walters <walters@verbum.org> | 2015-04-08 05:59:16 -0400 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2015-04-08 05:59:16 -0400 |
commit | 55220bdbf2363b9826ad05c7537abe057e69bacc (patch) | |
tree | 109bb7f972694dc441c489cd484ad6e7d79779ed /glnx-shutil.c | |
parent | 16f02afb2b8a764ff697fbad133f319ab9dea97f (diff) | |
download | libglnx-55220bdbf2363b9826ad05c7537abe057e69bacc.tar.gz |
shutil: Drop unnecessary new block scope
Diffstat (limited to 'glnx-shutil.c')
-rw-r--r-- | glnx-shutil.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/glnx-shutil.c b/glnx-shutil.c index e4df9ae..281e5bf 100644 --- a/glnx-shutil.c +++ b/glnx-shutil.c @@ -264,6 +264,7 @@ glnx_shutil_mkdir_p_at (int dfd, { gboolean ret = FALSE; struct stat stbuf; + char *buf; /* Fast path stat to see whether it already exists */ if (fstatat (dfd, path, &stbuf, AT_SYMLINK_NOFOLLOW) == 0) @@ -275,12 +276,10 @@ glnx_shutil_mkdir_p_at (int dfd, } } - { - char *buf = strdupa (path); + buf = strdupa (path); - if (!mkdir_p_at_internal (dfd, buf, mode, cancellable, error)) - goto out; - } + if (!mkdir_p_at_internal (dfd, buf, mode, cancellable, error)) + goto out; ret = TRUE; out: |