[SCM] Samba Shared Repository - branch master updated

Jeremy Allison jra at samba.org
Wed Feb 3 13:35:18 MST 2010


The branch, master has been updated
       via  e00e6a2... s3: Simplify the code a bit: Catch (len==0) early
      from  e1a1468... update samba schema for IBM Directory Server

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit e00e6a2c96760b4c64a3a0badefdb582caabd31a
Author: Volker Lendecke <vl at samba.org>
Date:   Wed Feb 3 07:37:29 2010 +0100

    s3: Simplify the code a bit: Catch (len==0) early

-----------------------------------------------------------------------

Summary of changes:
 source3/modules/vfs_expand_msdfs.c |   11 ++++-------
 1 files changed, 4 insertions(+), 7 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/modules/vfs_expand_msdfs.c b/source3/modules/vfs_expand_msdfs.c
index 177ebdb..0772215 100644
--- a/source3/modules/vfs_expand_msdfs.c
+++ b/source3/modules/vfs_expand_msdfs.c
@@ -187,7 +187,7 @@ static int expand_msdfs_readlink(struct vfs_handle_struct *handle,
 	result = SMB_VFS_NEXT_READLINK(handle, path, target,
 				       PATH_MAX);
 
-	if (result < 0)
+	if (result <= 0)
 		return result;
 
 	target[result] = '\0';
@@ -202,12 +202,9 @@ static int expand_msdfs_readlink(struct vfs_handle_struct *handle,
 	}
 
 	len = MIN(bufsiz, strlen(target));
-	if (len) {
-		memcpy(buf, target, len);
-	} else {
-		errno = ENOENT;
-		return -1;
-	}
+
+	memcpy(buf, target, len);
+
 	TALLOC_FREE(target);
 	return len;
 }


-- 
Samba Shared Repository


More information about the samba-cvs mailing list