moved the declaration of a variable closer to where it is used

This commit is contained in:
Fufu Fang 2021-06-02 01:57:23 +01:00
parent 55ea241d90
commit d856c0bf8f
No known key found for this signature in database
GPG Key ID: 0F6BB5EF6F8BB729
1 changed files with 1 additions and 2 deletions

View File

@ -120,7 +120,6 @@ static int fs_readdir(const char *path, void *buf, fuse_fill_dir_t dir_add,
(void) offset;
(void) fi;
Link *link;
LinkTable *linktbl;
if (!strcmp(path, "/")) {
@ -136,7 +135,7 @@ static int fs_readdir(const char *path, void *buf, fuse_fill_dir_t dir_add,
dir_add(buf, ".", NULL, 0);
dir_add(buf, "..", NULL, 0);
for (int i = 1; i < linktbl->num; i++) {
link = linktbl->links[i];
Link *link = linktbl->links[i];
if (link->type != LINK_INVALID) {
dir_add(buf, link->linkname, NULL, 0);
}