1
0
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:
Volker Lendecke 2015-02-24 13:46:09 +00:00 committed by Jeremy Allison
parent 4cdbf81243
commit f2f9acc113

View File

@ -1652,13 +1652,15 @@ 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);
}
while ((n = vfs_readdirname(conn, dirp->dir, sbuf, &talloced))) {
/* Ignore . and .. - we've already returned them. */