[master] 194ea52 Eliminate '&' which are surplus to requirements

Poul-Henning Kamp phk at FreeBSD.org
Fri Nov 29 12:24:43 CET 2013


commit 194ea520cda351f3bd9ede8879cd6296a7098ee0
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Fri Nov 29 11:24:21 2013 +0000

    Eliminate '&' which are surplus to requirements

diff --git a/bin/varnishlog/varnishlog.c b/bin/varnishlog/varnishlog.c
index 17cbdbe..02c476d 100644
--- a/bin/varnishlog/varnishlog.c
+++ b/bin/varnishlog/varnishlog.c
@@ -145,16 +145,16 @@ main(int argc, char * const *argv)
 
 	/* Setup output */
 	if (LOG.B_opt)
-		VUT.dispatch_f = &VSL_WriteTransactions;
+		VUT.dispatch_f = VSL_WriteTransactions;
 	else
-		VUT.dispatch_f = &VSL_PrintTransactions;
+		VUT.dispatch_f = VSL_PrintTransactions;
 	if (LOG.w_arg) {
 		openout(LOG.a_opt);
 		AN(LOG.fo);
-		VUT.sighup_f = &rotateout;
+		VUT.sighup_f = rotateout;
 	} else
 		LOG.fo = stdout;
-	VUT.idle_f = &flushout;
+	VUT.idle_f = flushout;
 
 	VUT_Setup();
 	VUT_Main();
diff --git a/lib/libvarnishapi/vsl2rst.c b/lib/libvarnishapi/vsl2rst.c
index bfbabb5..6992420 100644
--- a/lib/libvarnishapi/vsl2rst.c
+++ b/lib/libvarnishapi/vsl2rst.c
@@ -93,7 +93,7 @@ main(int argc, char *argv[])
 	for (i = 0; i < SLT__MAX; i++)
 		ptags[i] = &tags[i];
 
-	qsort(&ptags, SLT__MAX, sizeof *ptags, &ptag_cmp);
+	qsort(ptags, SLT__MAX, sizeof *ptags, ptag_cmp);
 
 	for (i = 0; i < SLT__MAX; i++) {
 		if (ptags[i]->name == NULL || !strcmp(ptags[i]->name, ""))
diff --git a/lib/libvarnishapi/vsl_query.c b/lib/libvarnishapi/vsl_query.c
index 4beface..495e00b 100644
--- a/lib/libvarnishapi/vsl_query.c
+++ b/lib/libvarnishapi/vsl_query.c
@@ -150,6 +150,8 @@ vslq_test_rec(const struct vex *vex, const struct VSLC_ptr *rec)
 			WRONG("Wrong RHS type");
 		}
 		break;
+	default:
+		break;
 	}
 
 	/* Compare */




More information about the varnish-commit mailing list