[master] 2b878a3 Get rid of this one-define .h file.

Poul-Henning Kamp phk at FreeBSD.org
Wed Dec 20 21:09:07 UTC 2017


commit 2b878a322220d16cb0a2e3dbd4048be7c8f30af5
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Wed Dec 20 21:08:17 2017 +0000

    Get rid of this one-define .h file.

diff --git a/bin/varnishd/common/common_vsc.c b/bin/varnishd/common/common_vsc.c
index ce07893..8b9bcd7 100644
--- a/bin/varnishd/common/common_vsc.c
+++ b/bin/varnishd/common/common_vsc.c
@@ -44,7 +44,6 @@
 #include "vmb.h"
 #include "vsmw.h"
 #include "vqueue.h"
-#include "vapi/vsc_int.h"
 
 #include "common/heritage.h"
 
@@ -83,7 +82,7 @@ VRT_VSC_Alloc(const char *nm, size_t sd, const unsigned char *jp,
 		bprintf(buf, "%s.%s", nm, fmt);
 
 	AN(heritage.proc_vsmw);
-	p = VSMW_Allocv(heritage.proc_vsmw, VSC_CLASS, 8 + sd + sj, buf, va);
+	p = VSMW_Allocv(heritage.proc_vsmw, "Stat", 8 + sd + sj, buf, va);
 	AN(p);
 
 	memcpy(p + 8 + sd, jp, sj);
diff --git a/include/Makefile.am b/include/Makefile.am
index 5bec5a5..99d6622 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -43,7 +43,6 @@ nobase_pkginclude_HEADERS = \
 	tbl/waiters.h \
 	vapi/vsm.h \
 	vapi/vsc.h \
-	vapi/vsc_int.h \
 	vapi/vsl.h \
 	vapi/vsl_int.h \
 	vapi/voptget.h \
diff --git a/include/vapi/vsc.h b/include/vapi/vsc.h
index 88ac0b7..82fa89f 100644
--- a/include/vapi/vsc.h
+++ b/include/vapi/vsc.h
@@ -35,8 +35,6 @@
 #ifndef VAPI_VSC_H_INCLUDED
 #define VAPI_VSC_H_INCLUDED
 
-#include "vapi/vsc_int.h"
-
 struct vsm;
 struct vsc;
 struct vsm_fantom;
diff --git a/include/vapi/vsc_int.h b/include/vapi/vsc_int.h
deleted file mode 100644
index 6859ac6..0000000
--- a/include/vapi/vsc_int.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/*-
- * Copyright (c) 2006 Verdens Gang AS
- * Copyright (c) 2006-2015 Varnish Software AS
- * All rights reserved.
- *
- * Author: Poul-Henning Kamp <phk at phk.freebsd.dk>
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-
-#define VSC_CLASS		"Stat"
diff --git a/lib/libvarnishapi/vsc.c b/lib/libvarnishapi/vsc.c
index 45a159a..b13550f 100644
--- a/lib/libvarnishapi/vsc.c
+++ b/lib/libvarnishapi/vsc.c
@@ -399,7 +399,7 @@ VSC_Iter(struct vsc *vsc, struct vsm *vsm, VSC_iter_f *fiter, void *priv)
 	AN(vsm);
 	sp = VTAILQ_FIRST(&vsc->segs);
 	VSM_FOREACH(&ifantom, vsm) {
-		if (strcmp(ifantom.class, VSC_CLASS))
+		if (strcmp(ifantom.class, "Stat"))
 			continue;
 		while (sp != NULL &&
 		    (strcmp(ifantom.ident, sp->fantom->ident) ||


More information about the varnish-commit mailing list