From: Marco van Wieringen Date: Tue, 26 Jun 2012 08:28:27 +0000 (+0200) Subject: Tweak layout. X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=c18bf7229fa2070d98902a00995023d4c33fe57c;p=bacula%2Fbacula Tweak layout. --- diff --git a/bacula/src/lib/bnet_server.c b/bacula/src/lib/bnet_server.c index 32dbe7ae37..853c1c7e59 100644 --- a/bacula/src/lib/bnet_server.c +++ b/bacula/src/lib/bnet_server.c @@ -97,11 +97,13 @@ void bnet_thread_server(dlist *addr_list, int max_clients, workq_t *client_wq, /* * Remove any duplicate addresses. */ - for (ipaddr = (IPADDR *)addr_list->first(); ipaddr; ipaddr = (IPADDR *)addr_list->next(ipaddr)) { - for (next = (IPADDR *)addr_list->next(ipaddr); next; next = (IPADDR *)addr_list->next(next)) { + for (ipaddr = (IPADDR *)addr_list->first(); ipaddr; + ipaddr = (IPADDR *)addr_list->next(ipaddr)) { + for (next = (IPADDR *)addr_list->next(ipaddr); next; + next = (IPADDR *)addr_list->next(next)) { if (ipaddr->get_sockaddr_len() == next->get_sockaddr_len() && - !memcmp(ipaddr->get_sockaddr(), next->get_sockaddr(), - ipaddr->get_sockaddr_len())) { + memcmp(ipaddr->get_sockaddr(), next->get_sockaddr(), + ipaddr->get_sockaddr_len()) == 0) { addr_list->remove(next); } } diff --git a/bacula/src/lib/bsock.c b/bacula/src/lib/bsock.c index c630bfbaf2..7ae4e45265 100644 --- a/bacula/src/lib/bsock.c +++ b/bacula/src/lib/bsock.c @@ -215,11 +215,13 @@ bool BSOCK::open(JCR *jcr, const char *name, char *host, char *service, /* * Remove any duplicate addresses. */ - for (ipaddr = (IPADDR *)addr_list->first(); ipaddr; ipaddr = (IPADDR *)addr_list->next(ipaddr)) { - for (next = (IPADDR *)addr_list->next(ipaddr); next; next = (IPADDR *)addr_list->next(next)) { + for (ipaddr = (IPADDR *)addr_list->first(); + ipaddr; ipaddr = (IPADDR *)addr_list->next(ipaddr)) { + for (next = (IPADDR *)addr_list->next(ipaddr); next; + next = (IPADDR *)addr_list->next(next)) { if (ipaddr->get_sockaddr_len() == next->get_sockaddr_len() && - !memcmp(ipaddr->get_sockaddr(), next->get_sockaddr(), - ipaddr->get_sockaddr_len())) { + memcmp(ipaddr->get_sockaddr(), next->get_sockaddr(), + ipaddr->get_sockaddr_len()) == 0) { addr_list->remove(next); } }