diff mbox

sendmmsg: Change type of flags parameter

Message ID 1401895778-28424-1-git-send-email-rv@rasmusvillemoes.dk
State New
Headers show

Commit Message

Rasmus Villemoes June 4, 2014, 3:29 p.m. UTC
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 <rv@rasmusvillemoes.dk>
---
 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(-)

Comments

Ondřej Bílka June 4, 2014, 4 p.m. UTC | #1
On Wed, Jun 04, 2014 at 05:29:38PM +0200, Rasmus Villemoes wrote:
> 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.
>
I send similar patch, see

[PING][PATCH v2][BZ 16852] Fix recvmmsg prototype
diff mbox

Patch

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))
     {