diff options
-rw-r--r-- | examples/libsmbclient/tree.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/libsmbclient/tree.c b/examples/libsmbclient/tree.c index f357c0306d..8dc9cc408b 100644 --- a/examples/libsmbclient/tree.c +++ b/examples/libsmbclient/tree.c @@ -745,8 +745,6 @@ int main( int argc, /* Now, get the items in smb:/// and add them to the tree */ - dirp = (struct smbc_dirent *)dirbuf; - while ((err = smbc_getdents(dh, (struct smbc_dirent *)dirbuf, sizeof(dirbuf))) != 0) { @@ -759,6 +757,8 @@ int main( int argc, } + dirp = (struct smbc_dirent *)dirbuf; + fprintf(stdout, "Dir len: %u\n", err); while (err > 0) { /* Extract each entry and make a sub-tree */ |