git.samba.org
/
obnox
/
samba-ctdb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fd63014
)
s3: Simplify the code a bit: Catch (len==0) early
author
Volker Lendecke
<vl@samba.org>
Wed, 3 Feb 2010 22:06:25 +0000
(14:06 -0800)
committer
Karolin Seeger
<kseeger@samba.org>
Thu, 4 Feb 2010 10:00:53 +0000
(11:00 +0100)
Part of a fix for bug #7081.
source3/modules/vfs_expand_msdfs.c
patch
|
blob
|
history
diff --git
a/source3/modules/vfs_expand_msdfs.c
b/source3/modules/vfs_expand_msdfs.c
index f58af205f90bac52c66fbd69eee5e20d32ddfb63..59f6f7a5b89d4e6591b75fd8d023ff7ef9b44f76 100644
(file)
--- 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;
}