[libglnx] shutil: Drop unnecessary new block scope



commit 55220bdbf2363b9826ad05c7537abe057e69bacc
Author: Colin Walters <walters verbum org>
Date:   Wed Apr 8 05:59:16 2015 -0400

    shutil: Drop unnecessary new block scope

 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:


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]