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: 356008 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id D8711140098 for ; Thu, 5 Jun 2014 01:30:05 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id; q=dns; s= default; b=iPljoVwtG3+7hGHHql0XJlAfEx3C8xl000gNheLuxvXi85n3Odu5/ GP55GIXqPlxZjK/gDTUE+ZC+IegprlBx91Q2EppYuaKW3C6vEMaNVp2MiLttagpm 0mSruXbWv9Zd56rrepzYwfvxJvXmzmFhdNv6FH1V3cVUZeietfa81M= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id; s=default; bh=lv2MC88B8RUewrobHyc3IXNFKsQ=; b=fdEipf/LLhyJ3k+ChwCEgnOHICx2 DYQY27eWeZtU/b7i7p9O0UPDmd6aYOgbzwO/ouBClHEkvPrmlOlmd3Zmp+ntmr4e NM9yAlckroks4nMIZ7z8ffENOEe6JQb6C8BvDRS9bTRepGWtAEjj9XQMsQoptgHC 1bI9d0tcYtdAyEE= 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)) {