int vfs_ChDir(connection_struct *conn, const struct smb_filename *smb_fname)
{
int ret;
- int saved_errno = 0;
struct smb_filename *old_cwd = conn->cwd_fname;
if (!LastDir) {
* Return to original directory
* and return -1.
*/
- saved_errno = errno;
+ int saved_errno = errno;
if (old_cwd == NULL) {
/*
DEBUG(4,("vfs_ChDir got %s\n", conn->cwd_fname->base_name));
TALLOC_FREE(old_cwd);
- if (saved_errno != 0) {
- errno = saved_errno;
- }
return ret;
}