aboutsummaryrefslogtreecommitdiff
path: root/lfn.h
diff options
context:
space:
mode:
Diffstat (limited to 'lfn.h')
-rw-r--r--lfn.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/lfn.h b/lfn.h
index ec50e75..0ad3df6 100644
--- a/lfn.h
+++ b/lfn.h
@@ -269,6 +269,8 @@ static inline char *find_real_name(
SHFLROOT root = data->drives[drive].root;
uint8_t hash_chars = data->drives[drive].opt.hash_chars;
SHFLSTRING *shflstr = &lfndirinfo.dirinfo.name; // reuse the lfndirinfo string buffer
+ // we can reuse it since we only need shflstr as input to the first call,
+ // before lfndirinfo is used
vboxerr err;
dprintf("find_real_name path=%Fs filename=%Fs\n", path, filename);
@@ -301,8 +303,6 @@ static inline char *find_real_name(
SHFL_LIST_RETURN_ONE, &size, shflstr, &lfndirinfo.dirinfo,
&resume, &count);
- // shflstr not needed anymore, and besides it is now used as lfndirinfo
- shflstr = NULL;
// Reset the size of the buffer (see find_next_from_vbox)
lfndirinfo.dirinfo.name.u16Size = sizeof(lfndirinfo.buf);