summaryrefslogtreecommitdiffstats
path: root/source3/lib/unix_msg
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2014-05-23 19:32:04 +0200
committerJeremy Allison <jra@samba.org>2014-05-24 02:56:31 +0200
commitec4496b823a7af6587ce6054452f7ef3bbb66084 (patch)
tree74ea29fdc41ed286f72f543add0611314c24bb5b /source3/lib/unix_msg
parent04cddfc739164aba6ee1466792ae542040604a07 (diff)
downloadsamba-ec4496b823a7af6587ce6054452f7ef3bbb66084.tar.gz
samba-ec4496b823a7af6587ce6054452f7ef3bbb66084.tar.xz
samba-ec4496b823a7af6587ce6054452f7ef3bbb66084.zip
unix_msg: Simplify unix_msg_send a bit
Now that we settled on variable arrays, remove a fixed one Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Sat May 24 02:56:31 CEST 2014 on sn-devel-104
Diffstat (limited to 'source3/lib/unix_msg')
-rw-r--r--source3/lib/unix_msg/unix_msg.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/source3/lib/unix_msg/unix_msg.c b/source3/lib/unix_msg/unix_msg.c
index ae8ee50551..956e3a3352 100644
--- a/source3/lib/unix_msg/unix_msg.c
+++ b/source3/lib/unix_msg/unix_msg.c
@@ -658,9 +658,8 @@ int unix_msg_send(struct unix_msg_ctx *ctx, const char *dst_sock,
return EINVAL;
}
- if ((iovlen < 16) &&
- (msglen <= (ctx->fragment_len - sizeof(uint64_t)))) {
- struct iovec tmp_iov[16];
+ if (msglen <= (ctx->fragment_len - sizeof(uint64_t))) {
+ struct iovec tmp_iov[iovlen+1];
uint64_t cookie = 0;
tmp_iov[0].iov_base = &cookie;