mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
smbd: Simplify ReadDirName
In the if-branches we return, so no "else" necessary Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
4cdbf81243
commit
f2f9acc113
@ -1652,14 +1652,16 @@ const char *ReadDirName(struct smb_Dir *dirp, long *poffset,
|
||||
dirp->file_number++;
|
||||
*ptalloced = NULL;
|
||||
return n;
|
||||
} else if (*poffset == END_OF_DIRECTORY_OFFSET) {
|
||||
}
|
||||
|
||||
if (*poffset == END_OF_DIRECTORY_OFFSET) {
|
||||
*poffset = dirp->offset = END_OF_DIRECTORY_OFFSET;
|
||||
return NULL;
|
||||
} else {
|
||||
/* A real offset, seek to it. */
|
||||
SeekDir(dirp, *poffset);
|
||||
}
|
||||
|
||||
/* A real offset, seek to it. */
|
||||
SeekDir(dirp, *poffset);
|
||||
|
||||
while ((n = vfs_readdirname(conn, dirp->dir, sbuf, &talloced))) {
|
||||
/* Ignore . and .. - we've already returned them. */
|
||||
if (*n == '.') {
|
||||
|
Loading…
Reference in New Issue
Block a user