Make the type checking macro name consistent with the TYPE_* constant. Signed-off-by: Eduardo Habkost <ehabk...@redhat.com> Reviewed-by: Zhang Chen <chen.zh...@intel.com> Message-Id: <20200902224311.1321159-41-ehabk...@redhat.com> Signed-off-by: Eduardo Habkost <ehabk...@redhat.com> --- net/filter-rewriter.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/net/filter-rewriter.c b/net/filter-rewriter.c index 113e293207..44f6021dd8 100644 --- a/net/filter-rewriter.c +++ b/net/filter-rewriter.c @@ -25,7 +25,7 @@ #define TYPE_FILTER_REWRITER "filter-rewriter" typedef struct RewriterState RewriterState; -DECLARE_INSTANCE_CHECKER(RewriterState, FILTER_COLO_REWRITER, +DECLARE_INSTANCE_CHECKER(RewriterState, FILTER_REWRITER, TYPE_FILTER_REWRITER) #define FAILOVER_MODE_ON true @@ -47,7 +47,7 @@ static void filter_rewriter_failover_mode(RewriterState *s) static void filter_rewriter_flush(NetFilterState *nf) { - RewriterState *s = FILTER_COLO_REWRITER(nf); + RewriterState *s = FILTER_REWRITER(nf); if (!qemu_net_queue_flush(s->incoming_queue)) { /* Unable to empty the queue, purge remaining packets */ @@ -252,7 +252,7 @@ static ssize_t colo_rewriter_receive_iov(NetFilterState *nf, int iovcnt, NetPacketSent *sent_cb) { - RewriterState *s = FILTER_COLO_REWRITER(nf); + RewriterState *s = FILTER_REWRITER(nf); Connection *conn; ConnectionKey key; Packet *pkt; @@ -350,7 +350,7 @@ static gboolean offset_is_nonzero(gpointer key, static void colo_rewriter_handle_event(NetFilterState *nf, int event, Error **errp) { - RewriterState *rs = FILTER_COLO_REWRITER(nf); + RewriterState *rs = FILTER_REWRITER(nf); switch (event) { case COLO_EVENT_CHECKPOINT: @@ -370,7 +370,7 @@ static void colo_rewriter_handle_event(NetFilterState *nf, int event, static void colo_rewriter_cleanup(NetFilterState *nf) { - RewriterState *s = FILTER_COLO_REWRITER(nf); + RewriterState *s = FILTER_REWRITER(nf); /* flush packets */ if (s->incoming_queue) { @@ -381,7 +381,7 @@ static void colo_rewriter_cleanup(NetFilterState *nf) static void colo_rewriter_setup(NetFilterState *nf, Error **errp) { - RewriterState *s = FILTER_COLO_REWRITER(nf); + RewriterState *s = FILTER_REWRITER(nf); s->connection_track_table = g_hash_table_new_full(connection_key_hash, connection_key_equal, @@ -392,7 +392,7 @@ static void colo_rewriter_setup(NetFilterState *nf, Error **errp) static bool filter_rewriter_get_vnet_hdr(Object *obj, Error **errp) { - RewriterState *s = FILTER_COLO_REWRITER(obj); + RewriterState *s = FILTER_REWRITER(obj); return s->vnet_hdr; } @@ -401,14 +401,14 @@ static void filter_rewriter_set_vnet_hdr(Object *obj, bool value, Error **errp) { - RewriterState *s = FILTER_COLO_REWRITER(obj); + RewriterState *s = FILTER_REWRITER(obj); s->vnet_hdr = value; } static void filter_rewriter_init(Object *obj) { - RewriterState *s = FILTER_COLO_REWRITER(obj); + RewriterState *s = FILTER_REWRITER(obj); s->vnet_hdr = false; s->failover_mode = FAILOVER_MODE_OFF; -- 2.26.2