From patchwork Wed Jun 4 15:29:38 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rasmus Villemoes X-Patchwork-Id: 1306 Received: (qmail 14853 invoked by alias); 4 Jun 2014 15:29:59 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 14835 invoked by uid 89); 4 Jun 2014 15:29:58 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 X-HELO: mail-lb0-f175.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=z6237dmjL2+DMnEw2tuE5v38bYrueuHkn9h+wSQD/mc=; b=VzzGkuMEKyamsW+i9PUrM4qGp6PubmvoqOEAs7HijRGRjThRfli6eB5V6/7lRNTIgY +tAqnsUWF2ijDamOfkD71O7fSCyUIbZ7mAQRWGp/UaTMcywB8Kq+OAQorAmcNUsyB90i +VLx7lkljdCbSqI01h5qOL0rXBToIVdb6610QxlmHVPwPUMRXkD8OSGWzkOaQHcjpGBW a0DH9vCzxRulZchy4Gj9fGTi3gEixYUiNWCqrgOYe5UrmGsniCS/yud6onTcSkagEOsl P+t/02jCQakCKN8VNnQU/1b7TIp9UUh/VYOtP/VSLww2wKEzjPXZTr25OBfvx4vgnFXW c/sg== X-Gm-Message-State: ALoCoQnQC+Zku5XB2ZN+dafbAbHKbwzsjC/0m+b2HFOgEFE7r61ISESQW3PXvbuV8+VMfA0xiars X-Received: by 10.112.138.37 with SMTP id qn5mr14496631lbb.52.1401895793386; Wed, 04 Jun 2014 08:29:53 -0700 (PDT) From: Rasmus Villemoes To: libc-alpha@sourceware.org Cc: Rasmus Villemoes Subject: [PATCH] sendmmsg: Change type of flags parameter Date: Wed, 4 Jun 2014 17:29:38 +0200 Message-Id: <1401895778-28424-1-git-send-email-rv@rasmusvillemoes.dk> Both the kernel source and the man-page sendmmsg(2) say that the flags parameter of sendmmsg has type unsigned int. Be consistent with those. Signed-off-by: Rasmus Villemoes --- include/sys/socket.h | 2 +- socket/sendmmsg.c | 2 +- socket/sys/socket.h | 2 +- sysdeps/unix/sysv/linux/sendmmsg.c | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/sys/socket.h b/include/sys/socket.h index 9caf1bb..2b3dd5c 100644 --- a/include/sys/socket.h +++ b/include/sys/socket.h @@ -92,7 +92,7 @@ extern ssize_t __sendmsg (int __fd, const struct msghdr *__message, int __flags) attribute_hidden; extern int __sendmmsg (int __fd, struct mmsghdr *__vmessages, - unsigned int __vlen, int __flags); + unsigned int __vlen, unsigned int __flags); libc_hidden_proto (__sendmmsg) /* Receive a message as described by MESSAGE from socket FD. diff --git a/socket/sendmmsg.c b/socket/sendmmsg.c index e7e5cdc..a004985 100644 --- a/socket/sendmmsg.c +++ b/socket/sendmmsg.c @@ -22,7 +22,7 @@ /* Send a VLEN messages as described by VMESSAGES to socket FD. Returns the number of datagrams successfully written or -1 for errors. */ int -__sendmmsg (int fd, struct mmsghdr *vmessages, unsigned int vlen, int flags) +__sendmmsg (int fd, struct mmsghdr *vmessages, unsigned int vlen, unsigned int flags) { __set_errno (ENOSYS); return -1; diff --git a/socket/sys/socket.h b/socket/sys/socket.h index 95ee26a..f92d947 100644 --- a/socket/sys/socket.h +++ b/socket/sys/socket.h @@ -191,7 +191,7 @@ extern ssize_t sendmsg (int __fd, const struct msghdr *__message, This function is a cancellation point and therefore not marked with __THROW. */ extern int sendmmsg (int __fd, struct mmsghdr *__vmessages, - unsigned int __vlen, int __flags); + unsigned int __vlen, unsigned int __flags); #endif /* Receive a message as described by MESSAGE from socket FD. diff --git a/sysdeps/unix/sysv/linux/sendmmsg.c b/sysdeps/unix/sysv/linux/sendmmsg.c index 3074066..00961f7 100644 --- a/sysdeps/unix/sysv/linux/sendmmsg.c +++ b/sysdeps/unix/sysv/linux/sendmmsg.c @@ -34,7 +34,7 @@ #ifdef __NR_sendmmsg int -__sendmmsg (int fd, struct mmsghdr *vmessages, unsigned int vlen, int flags) +__sendmmsg (int fd, struct mmsghdr *vmessages, unsigned int vlen, unsigned int flags) { if (SINGLE_THREAD_P) return INLINE_SYSCALL (sendmmsg, 4, fd, vmessages, vlen, flags); @@ -52,13 +52,13 @@ weak_alias (__sendmmsg, sendmmsg) #elif defined __NR_socketcall # ifndef __ASSUME_SENDMMSG_SOCKETCALL extern int __internal_sendmmsg (int fd, struct mmsghdr *vmessages, - unsigned int vlen, int flags) + unsigned int vlen, unsigned int flags) attribute_hidden; static int have_sendmmsg; int -__sendmmsg (int fd, struct mmsghdr *vmessages, unsigned int vlen, int flags) +__sendmmsg (int fd, struct mmsghdr *vmessages, unsigned int vlen, unsigned int flags) { if (__glibc_likely (have_sendmmsg >= 0)) {