git.samba.org
/
kai
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f1cdce6
)
Use ZERO_STRUCTP in util_net
author
Volker Lendecke
<vl@samba.org>
Sat, 14 May 2011 15:39:40 +0000
(17:39 +0200)
committer
Volker Lendecke
<vl@samba.org>
Sat, 14 May 2011 15:57:13 +0000
(17:57 +0200)
lib/util/util_net.c
patch
|
blob
|
history
diff --git
a/lib/util/util_net.c
b/lib/util/util_net.c
index 7d678c9b149b28e49f39776b7b25db6e1dc6dd5f..98eef3bd8bc3f1f1e310a25110d0826b4ef760d3 100644
(file)
--- a/
lib/util/util_net.c
+++ b/
lib/util/util_net.c
@@
-405,7
+405,7
@@
bool is_zero_addr(const struct sockaddr_storage *pss)
*/
void zero_ip_v4(struct in_addr *ip)
{
-
memset(ip, '\0', sizeof(struct in_addr)
);
+
ZERO_STRUCTP(ip
);
}
/**
@@
-415,7
+415,7
@@
void in_addr_to_sockaddr_storage(struct sockaddr_storage *ss,
struct in_addr ip)
{
struct sockaddr_in *sa = (struct sockaddr_in *)ss;
-
memset(ss, '\0', sizeof(*ss)
);
+
ZERO_STRUCTP(ss
);
sa->sin_family = AF_INET;
sa->sin_addr = ip;
}