Commit 31741471 authored by Dag Erling Smørgrav's avatar Dag Erling Smørgrav

Get rid of <strings.h>.


git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@3345 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 7e32b979
...@@ -102,7 +102,7 @@ TCP_filter_http(int sock) ...@@ -102,7 +102,7 @@ TCP_filter_http(int sock)
struct accept_filter_arg afa; struct accept_filter_arg afa;
int i; int i;
bzero(&afa, sizeof(afa)); memset(&afa, 0, sizeof(afa));
strcpy(afa.af_name, "httpready"); strcpy(afa.af_name, "httpready");
errno = 0; errno = 0;
i = setsockopt(sock, SOL_SOCKET, SO_ACCEPTFILTER, i = setsockopt(sock, SOL_SOCKET, SO_ACCEPTFILTER,
......
...@@ -36,7 +36,6 @@ ...@@ -36,7 +36,6 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <strings.h>
#include "libvarnish.h" #include "libvarnish.h"
#include "vsb.h" #include "vsb.h"
...@@ -137,7 +136,7 @@ vsb_extend(struct vsb *s, int addlen) ...@@ -137,7 +136,7 @@ vsb_extend(struct vsb *s, int addlen)
newbuf = (char *)SBMALLOC(newsize); newbuf = (char *)SBMALLOC(newsize);
if (newbuf == NULL) if (newbuf == NULL)
return (-1); return (-1);
bcopy(s->s_buf, newbuf, s->s_size); memcpy(newbuf, s->s_buf, s->s_size);
if (VSB_ISDYNAMIC(s)) if (VSB_ISDYNAMIC(s))
SBFREE(s->s_buf); SBFREE(s->s_buf);
else else
...@@ -165,12 +164,12 @@ vsb_new(struct vsb *s, char *buf, int length, int flags) ...@@ -165,12 +164,12 @@ vsb_new(struct vsb *s, char *buf, int length, int flags)
s = (struct vsb *)SBMALLOC(sizeof *s); s = (struct vsb *)SBMALLOC(sizeof *s);
if (s == NULL) if (s == NULL)
return (NULL); return (NULL);
bzero(s, sizeof *s); memset(s, 0, sizeof *s);
s->s_flags = flags; s->s_flags = flags;
s->s_magic = VSB_MAGIC; s->s_magic = VSB_MAGIC;
VSB_SETFLAG(s, VSB_DYNSTRUCT); VSB_SETFLAG(s, VSB_DYNSTRUCT);
} else { } else {
bzero(s, sizeof *s); memset(s, 0, sizeof *s);
s->s_flags = flags; s->s_flags = flags;
s->s_magic = VSB_MAGIC; s->s_magic = VSB_MAGIC;
} }
...@@ -466,7 +465,7 @@ vsb_delete(struct vsb *s) ...@@ -466,7 +465,7 @@ vsb_delete(struct vsb *s)
if (VSB_ISDYNAMIC(s)) if (VSB_ISDYNAMIC(s))
SBFREE(s->s_buf); SBFREE(s->s_buf);
isdyn = VSB_ISDYNSTRUCT(s); isdyn = VSB_ISDYNSTRUCT(s);
bzero(s, sizeof *s); memset(s, 0, sizeof *s);
if (isdyn) if (isdyn)
SBFREE(s); SBFREE(s);
} }
......
...@@ -36,7 +36,6 @@ ...@@ -36,7 +36,6 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <strings.h>
#ifndef HAVE_STRLCPY #ifndef HAVE_STRLCPY
#include "compat/strlcpy.h" #include "compat/strlcpy.h"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment