r3594 - in branches/2.0/varnish-cache/lib: libvarnish libvarnishcompat

tfheen at projects.linpro.no tfheen at projects.linpro.no
Thu Feb 5 10:53:24 CET 2009


Author: tfheen
Date: 2009-02-05 10:53:24 +0100 (Thu, 05 Feb 2009)
New Revision: 3594

Modified:
   branches/2.0/varnish-cache/lib/libvarnish/tcp.c
   branches/2.0/varnish-cache/lib/libvarnish/vsb.c
   branches/2.0/varnish-cache/lib/libvarnishcompat/strndup.c
Log:
Merge r3345: Get rid of <strings.h>.



Modified: branches/2.0/varnish-cache/lib/libvarnish/tcp.c
===================================================================
--- branches/2.0/varnish-cache/lib/libvarnish/tcp.c	2009-02-05 09:50:34 UTC (rev 3593)
+++ branches/2.0/varnish-cache/lib/libvarnish/tcp.c	2009-02-05 09:53:24 UTC (rev 3594)
@@ -102,7 +102,7 @@
 	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,

Modified: branches/2.0/varnish-cache/lib/libvarnish/vsb.c
===================================================================
--- branches/2.0/varnish-cache/lib/libvarnish/vsb.c	2009-02-05 09:50:34 UTC (rev 3593)
+++ branches/2.0/varnish-cache/lib/libvarnish/vsb.c	2009-02-05 09:53:24 UTC (rev 3594)
@@ -34,7 +34,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include <strings.h>
 
 #include "libvarnish.h"
 #include "vsb.h"
@@ -135,7 +134,7 @@
 	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
@@ -163,12 +162,12 @@
 		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;
 	}
@@ -464,7 +463,7 @@
 	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);
 }

Modified: branches/2.0/varnish-cache/lib/libvarnishcompat/strndup.c
===================================================================
--- branches/2.0/varnish-cache/lib/libvarnishcompat/strndup.c	2009-02-05 09:50:34 UTC (rev 3593)
+++ branches/2.0/varnish-cache/lib/libvarnishcompat/strndup.c	2009-02-05 09:53:24 UTC (rev 3594)
@@ -36,7 +36,6 @@
 
 #include <stdlib.h>
 #include <string.h>
-#include <strings.h>
 
 #ifndef HAVE_STRLCPY
 #include "compat/strlcpy.h"



More information about the varnish-commit mailing list