Skip to content
This repository was archived by the owner on Feb 28, 2025. It is now read-only.

Commit 3ba7624

Browse files
committed
(local_opendir): narrow variable scopes joining declaration and assignment
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
1 parent 29a1c87 commit 3ba7624

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/vfs/local/local.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,9 @@ local_open (const vfs_path_t *vpath, int flags, mode_t mode)
8383
static void *
8484
local_opendir (const vfs_path_t *vpath)
8585
{
86-
DIR **local_info;
8786
DIR *dir = NULL;
88-
const char *path;
8987

90-
path = vfs_path_get_last_path_str (vpath);
88+
const char* path = vfs_path_get_last_path_str(vpath);
9189

9290
/* On Linux >= 5.1, MC sometimes shows empty directories on mounted CIFS shares.
9391
* Rereading directory restores the directory content.
@@ -109,7 +107,7 @@ local_opendir (const vfs_path_t *vpath)
109107
rewinddir (dir);
110108
}
111109

112-
local_info = (DIR **) g_new (DIR *, 1);
110+
DIR** local_info = (DIR**) g_new(DIR *, 1);
113111
*local_info = dir;
114112

115113
return local_info;

0 commit comments

Comments
 (0)