git.samba.org
/
bbaumbach
/
samba-autobuild
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
29b591d
)
libsmb: Use ARRAY_DEL_ELEMENT() in remove_duplicate_addrs2()
author
Volker Lendecke
<vl@samba.org>
Thu, 26 Mar 2020 09:36:19 +0000
(10:36 +0100)
committer
Ralph Boehme
<slow@samba.org>
Thu, 26 Mar 2020 14:43:31 +0000
(14:43 +0000)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/libsmb/namequery.c
patch
|
blob
|
history
diff --git
a/source3/libsmb/namequery.c
b/source3/libsmb/namequery.c
index 454ea61a8956ee38e40f9e89c6876b6618060c00..642f7b91b5a997c19b02c1ea6ca0328cd56ff115 100644
(file)
--- a/
source3/libsmb/namequery.c
+++ b/
source3/libsmb/namequery.c
@@
-1166,11
+1166,7
@@
int remove_duplicate_addrs2(struct ip_service *iplist, int count )
for (i = 0; i < count; i++) {
while (i < count &&
is_zero_addr(&iplist[i].ss)) {
- if (count-i-1>0) {
- memmove(&iplist[i],
- &iplist[i+1],
- (count-i-1)*sizeof(struct ip_service));
- }
+ ARRAY_DEL_ELEMENT(iplist, i, count);
count--;
}
}