From 53880c893068baa77b0a4936cb3f488df2abd3fe Mon Sep 17 00:00:00 2001 From: Marco van Wieringen Date: Tue, 26 Jun 2012 10:28:27 +0200 Subject: [PATCH] Tweak layout. --- bacula/src/lib/bnet_server.c | 10 ++++++---- bacula/src/lib/bsock.c | 10 ++++++---- 2 files changed, 12 insertions(+), 8 deletions(-) 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); } } -- 2.39.5