Found by Coverity.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
int fd_close_posix(const struct files_struct *fsp)
{
- int saved_errno = 0;
- int ret;
NTSTATUS status;
if (!lp_locking(fsp->conn->params) ||
* Finally close the fd associated with this fsp.
*/
- ret = close(fsp->fh->fd);
-
- if (ret == 0 && saved_errno != 0) {
- errno = saved_errno;
- ret = -1;
- }
-
- return ret;
+ return close(fsp->fh->fd);
}
/****************************************************************************