Introduction
Introduction Statistics Contact Development Disclaimer Help
bzero is deprecated. Now using memset. - geomyidae - A small C-based gopherd.
git clone git://bitreich.org/geomyidae/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfri…
Log
Files
Refs
Tags
README
LICENSE
---
commit d6239545026f3a464d7f76ec0ff9763d8f3b7061
parent 75b457bc0c3618d07f67b08a3efe498791dd5fee
Author: Christoph Lohmann <[email protected]>
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(-)
---
diff --git a/main.c b/main.c
@@ -134,9 +134,9 @@ handlerequest(int sock, char *base, char *ohost, char *port…
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;
You are viewing proxied material from bitreich.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.