[PATCH 10/13] socket: use more appropriate types for mnl_socket_bind

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



groups, being a bitmask, should be unsigned; and let's also use pid_t
for pid.

Signed-off-by: Jan Engelhardt <jengelh@xxxxxxxxxx>
---
 include/libmnl/libmnl.h |    2 +-
 src/socket.c            |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/libmnl/libmnl.h b/include/libmnl/libmnl.h
index d35e1c1..d766183 100644
--- a/include/libmnl/libmnl.h
+++ b/include/libmnl/libmnl.h
@@ -16,7 +16,7 @@
 struct mnl_socket;
 
 extern struct mnl_socket *mnl_socket_open(int type);
-extern int mnl_socket_bind(struct mnl_socket *nl, int groups, int pid);
+extern int mnl_socket_bind(struct mnl_socket *nl, unsigned int groups, pid_t pid);
 extern int mnl_socket_close(struct mnl_socket *nl);
 extern int mnl_socket_get_fd(const struct mnl_socket *nl);
 extern unsigned int mnl_socket_get_portid(const struct mnl_socket *nl);
diff --git a/src/socket.c b/src/socket.c
index 6ca3d3e..c9afd34 100644
--- a/src/socket.c
+++ b/src/socket.c
@@ -131,7 +131,7 @@ struct mnl_socket *mnl_socket_open(int bus)
  * success, 0 is returned. You can use MNL_SOCKET_AUTOPID which is 0 for
  * automatic port ID selection.
  */
-int mnl_socket_bind(struct mnl_socket *nl, int groups, int pid)
+int mnl_socket_bind(struct mnl_socket *nl, unsigned int groups, pid_t pid)
 {
 	int ret;
 	socklen_t addr_len;
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux