From: Justin Pettit Date: Mon, 10 Oct 2011 23:44:28 +0000 (-0700) Subject: ofproto: Mark 'ofproto' arg in is_mirror_output_bundle() as const. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b4affc74175281b1300d879df56d8558bd553ea5;p=openvswitch 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. --- diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c index 38f5be70..4629efae 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 38dbd2d7..4abe92a1 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 aa3f0e43..988e33d2 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 1f39a254..9a8f755e 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 *);