sendmmsg: Change type of flags parameter
Commit Message
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
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
@@ -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.
@@ -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;
@@ -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.
@@ -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))
{