This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH] sendmmsg: Change type of flags parameter
- From: Rasmus Villemoes <rv at rasmusvillemoes dot dk>
- To: libc-alpha at sourceware dot org
- Cc: Rasmus Villemoes <rv at rasmusvillemoes dot dk>
- Date: Wed, 4 Jun 2014 17:29:38 +0200
- Subject: [PATCH] sendmmsg: Change type of flags parameter
- Authentication-results: sourceware.org; auth=none
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(-)
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))
{
--
1.9.2