[gvfs/wip/hadess/fast-content-type: 1/10] smb: Move variable to block	where it's used
- From: Bastien Nocera <hadess src gnome org>
 
- To: commits-list gnome org
 
- Cc: 
 
- Subject: [gvfs/wip/hadess/fast-content-type: 1/10] smb: Move variable to block	where it's used
 
- Date: Fri, 11 Oct 2019 10:03:58 +0000 (UTC)
 
commit 2cef44a99ee4744580e97ecb6b37bd70dc3fe76a
Author: Bastien Nocera <hadess hadess net>
Date:   Fri Oct 11 11:43:37 2019 +0200
    smb: Move variable to block where it's used
    
    content_type was only used and initialised inside this block, so move it
    there.
 daemon/gvfsbackendsmb.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
---
diff --git a/daemon/gvfsbackendsmb.c b/daemon/gvfsbackendsmb.c
index 353e85d6..e6ffa5c4 100644
--- a/daemon/gvfsbackendsmb.c
+++ b/daemon/gvfsbackendsmb.c
@@ -1361,7 +1361,6 @@ set_info_from_stat (GVfsBackendSmb *backend,
                    GFileAttributeMatcher *matcher)
 {
   GFileType file_type;
-  char *content_type;
   char *display_name;
 
   if (basename)
@@ -1442,9 +1441,8 @@ set_info_from_stat (GVfsBackendSmb *backend,
     {
       GIcon *icon = NULL;
       GIcon *symbolic_icon = NULL;
+      char *content_type = NULL;
 
-      content_type = NULL;
-      
       if (S_ISDIR(statbuf->st_mode))
        {
          content_type = g_strdup ("inode/directory");
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]