From b4affc74175281b1300d879df56d8558bd553ea5 Mon Sep 17 00:00:00 2001 From: Justin Pettit Date: Mon, 10 Oct 2011 16:44:28 -0700 Subject: [PATCH] ofproto: Mark 'ofproto' arg in is_mirror_output_bundle() as const. No changes are made to 'ofproto', so it's safe to mark the argument as const. This will be useful in a later commit. --- ofproto/ofproto-dpif.c | 2 +- ofproto/ofproto-provider.h | 2 +- ofproto/ofproto.c | 2 +- ofproto/ofproto.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c index 38f5be700..4629efae6 100644 --- a/ofproto/ofproto-dpif.c +++ b/ofproto/ofproto-dpif.c @@ -1543,7 +1543,7 @@ set_flood_vlans(struct ofproto *ofproto_, unsigned long *flood_vlans) } static bool -is_mirror_output_bundle(struct ofproto *ofproto_, void *aux) +is_mirror_output_bundle(const struct ofproto *ofproto_, void *aux) { struct ofproto_dpif *ofproto = ofproto_dpif_cast(ofproto_); struct ofbundle *bundle = bundle_lookup(ofproto, aux); diff --git a/ofproto/ofproto-provider.h b/ofproto/ofproto-provider.h index 38dbd2d77..4abe92a13 100644 --- a/ofproto/ofproto-provider.h +++ b/ofproto/ofproto-provider.h @@ -970,7 +970,7 @@ struct ofproto_class { /* Returns true if 'aux' is a registered bundle that is currently in use as * the output for a mirror. */ - bool (*is_mirror_output_bundle)(struct ofproto *ofproto, void *aux); + bool (*is_mirror_output_bundle)(const struct ofproto *ofproto, void *aux); /* When the configuration option of forward_bpdu changes, this function * will be invoked. */ diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c index aa3f0e438..988e33d23 100644 --- a/ofproto/ofproto.c +++ b/ofproto/ofproto.c @@ -659,7 +659,7 @@ ofproto_set_flood_vlans(struct ofproto *ofproto, unsigned long *flood_vlans) /* Returns true if 'aux' is a registered bundle that is currently in use as the * output for a mirror. */ bool -ofproto_is_mirror_output_bundle(struct ofproto *ofproto, void *aux) +ofproto_is_mirror_output_bundle(const struct ofproto *ofproto, void *aux) { return (ofproto->ofproto_class->is_mirror_output_bundle ? ofproto->ofproto_class->is_mirror_output_bundle(ofproto, aux) diff --git a/ofproto/ofproto.h b/ofproto/ofproto.h index 1f39a2546..9a8f755e3 100644 --- a/ofproto/ofproto.h +++ b/ofproto/ofproto.h @@ -249,7 +249,7 @@ int ofproto_mirror_register(struct ofproto *, void *aux, int ofproto_mirror_unregister(struct ofproto *, void *aux); int ofproto_set_flood_vlans(struct ofproto *, unsigned long *flood_vlans); -bool ofproto_is_mirror_output_bundle(struct ofproto *, void *aux); +bool ofproto_is_mirror_output_bundle(const struct ofproto *, void *aux); /* Configuration querying. */ bool ofproto_has_snoops(const struct ofproto *); -- 2.43.0