[PATCH] unix_msg: Simplify unix_msg_send a bit
Michael Adam
obnox at samba.org
Sat May 24 05:40:07 MDT 2014
pushed
On 2014-05-23 at 19:40 +0200, Volker Lendecke wrote:
> Review would be appreciated!
>
> Thanks,
>
> Volker
>
> --
> SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
> phone: +49-551-370000-0, fax: +49-551-370000-9
> AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
> http://www.sernet.de, mailto:kontakt at sernet.de
> From eb7d0e43b359cb0d9fe829396c8b101c03bc08b8 Mon Sep 17 00:00:00 2001
> From: Volker Lendecke <vl at samba.org>
> Date: Fri, 23 May 2014 19:32:04 +0200
> Subject: [PATCH] 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 at samba.org>
> ---
> source3/lib/unix_msg/unix_msg.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/source3/lib/unix_msg/unix_msg.c b/source3/lib/unix_msg/unix_msg.c
> index ae8ee50..956e3a3 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;
> --
> 1.7.9.5
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20140524/e925bb14/attachment.pgp>
More information about the samba-technical
mailing list