bzero is deprecated. Now using memset. - geomyidae - A small C-based gopherd.
(HTM) git clone git://bitreich.org/geomyidae/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/geomyidae/
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) Tags
(DIR) README
(DIR) LICENSE
---
(DIR) commit d6239545026f3a464d7f76ec0ff9763d8f3b7061
(DIR) parent 75b457bc0c3618d07f67b08a3efe498791dd5fee
(HTM) Author: Christoph Lohmann <20h@r-36.net>
Date: Sun, 27 Nov 2011 10:20:59 +0100
bzero is deprecated. Now using memset.
Diffstat:
M main.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
---
(DIR) diff --git a/main.c b/main.c
@@ -134,9 +134,9 @@ handlerequest(int sock, char *base, char *ohost, char *port, char *clienth,
int len, fd;
filetype *type;
- bzero(&dir, sizeof(dir));
- bzero(recvb, sizeof(recvb));
- bzero(recvc, sizeof(recvc));
+ memset(&dir, 0, sizeof(dir));
+ memset(recvb, 0, sizeof(recvb));
+ memset(recvc, 0, sizeof(recvc));
args = nil;
len = recv(sock, recvb, sizeof(recvb)-1, 0);
@@ -341,7 +341,7 @@ main(int argc, char *argv[])
}
}
- bzero(&hints, sizeof(hints));
+ memset(&hints, 0, sizeof(hints));
hints.ai_flags = AI_PASSIVE;
hints.ai_socktype = SOCK_STREAM;
hints.ai_protocol = IPPROTO_TCP;