]> err.no Git - varnish/commitdiff
Get rid of <strings.h>.
authordes <des@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Wed, 22 Oct 2008 11:33:58 +0000 (11:33 +0000)
committerdes <des@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Wed, 22 Oct 2008 11:33:58 +0000 (11:33 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3345 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/lib/libvarnish/tcp.c
varnish-cache/lib/libvarnish/vsb.c
varnish-cache/lib/libvarnishcompat/strndup.c

index ecd18a5972644d3d3fd996a5c7f72510b97d1fe3..427c469e43f7c7f4ca8a0925b99e4a0da503fb30 100644 (file)
@@ -102,7 +102,7 @@ TCP_filter_http(int sock)
        struct accept_filter_arg afa;
        int i;
 
-       bzero(&afa, sizeof(afa));
+       memset(&afa, 0, sizeof(afa));
        strcpy(afa.af_name, "httpready");
        errno = 0;
        i = setsockopt(sock, SOL_SOCKET, SO_ACCEPTFILTER,
index 711054e2180bcb1af1206b0666ce453fa893a620..c4a599ab21bf8adaecffc00595366f7a6fa87282 100644 (file)
@@ -36,7 +36,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include <strings.h>
 
 #include "libvarnish.h"
 #include "vsb.h"
@@ -137,7 +136,7 @@ vsb_extend(struct vsb *s, int addlen)
        newbuf = (char *)SBMALLOC(newsize);
        if (newbuf == NULL)
                return (-1);
-       bcopy(s->s_buf, newbuf, s->s_size);
+       memcpy(newbuf, s->s_buf, s->s_size);
        if (VSB_ISDYNAMIC(s))
                SBFREE(s->s_buf);
        else
@@ -165,12 +164,12 @@ vsb_new(struct vsb *s, char *buf, int length, int flags)
                s = (struct vsb *)SBMALLOC(sizeof *s);
                if (s == NULL)
                        return (NULL);
-               bzero(s, sizeof *s);
+               memset(s, 0, sizeof *s);
                s->s_flags = flags;
                s->s_magic = VSB_MAGIC;
                VSB_SETFLAG(s, VSB_DYNSTRUCT);
        } else {
-               bzero(s, sizeof *s);
+               memset(s, 0, sizeof *s);
                s->s_flags = flags;
                s->s_magic = VSB_MAGIC;
        }
@@ -466,7 +465,7 @@ vsb_delete(struct vsb *s)
        if (VSB_ISDYNAMIC(s))
                SBFREE(s->s_buf);
        isdyn = VSB_ISDYNSTRUCT(s);
-       bzero(s, sizeof *s);
+       memset(s, 0, sizeof *s);
        if (isdyn)
                SBFREE(s);
 }
index 72bef7ad165dbd2cc6cb891685c1394d4e8d38a3..201c097b3da35386aea8a3dd1761dab010d92551 100644 (file)
@@ -36,7 +36,6 @@
 
 #include <stdlib.h>
 #include <string.h>
-#include <strings.h>
 
 #ifndef HAVE_STRLCPY
 #include "compat/strlcpy.h"