Hi Fixes a Clang warning. The file had used only a pointer to in_addr, when it should have used a struct!
- Lauri
>From f88221e9918b4d43da7bcbd4ed7a7b0dcd435b32 Mon Sep 17 00:00:00 2001 From: Lauri Kasanen <[email protected]> Date: Wed, 23 May 2012 18:04:37 +0300 Subject: [PATCH 12/13] mandril: Correct in_addr usage Fixes a Clang warning. The file had used only a pointer to in_addr, when it should have used a struct! Signed-off-by: Lauri Kasanen <[email protected]> --- plugins/mandril/mandril.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/mandril/mandril.c b/plugins/mandril/mandril.c index 634467b..0ba6a88 100644 --- a/plugins/mandril/mandril.c +++ b/plugins/mandril/mandril.c @@ -155,10 +155,11 @@ static int mk_security_check_ip(int socket) int network; struct mk_secure_ip_t *entry; struct mk_list *head; - struct in_addr *addr = NULL; + struct in_addr addr_t, *addr = &addr_t; socklen_t len = sizeof(addr); - getpeername(socket, (struct sockaddr *)addr, &len); + if (getpeername(socket, (struct sockaddr *)&addr_t, &len) < 0) + return -1; PLUGIN_TRACE("[FD %i] Mandril validating IP address", socket); mk_list_foreach(head, &mk_secure_ip) { -- 1.7.2.1
_______________________________________________ Monkey mailing list [email protected] http://lists.monkey-project.com/listinfo/monkey
