hw/net: remove return after g_assert_not_reached()
authorPierrick Bouvier <pierrick.bouvier@linaro.org>
Thu, 19 Sep 2024 04:46:34 +0000 (21:46 -0700)
committerThomas Huth <thuth@redhat.com>
Tue, 24 Sep 2024 11:53:35 +0000 (13:53 +0200)
This patch is part of a series that moves towards a consistent use of
g_assert_not_reached() rather than an ad hoc mix of different
assertion mechanisms.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Message-ID: <20240919044641.386068-28-pierrick.bouvier@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
hw/net/e1000e_core.c
hw/net/igb_core.c
hw/net/vmxnet3.c

index 248381f9766f5bc1f0fbbef8136029d726b23625..2e4c50ddbaf04b1182d178875bf68bcfb8b7d42c 100644 (file)
@@ -562,7 +562,6 @@ e1000e_rss_calc_hash(E1000ECore *core,
         break;
     default:
         g_assert_not_reached();
-        return 0;
     }
 
     return net_rx_pkt_calc_rss_hash(pkt, type, (uint8_t *) &core->mac[RSSRK]);
@@ -841,7 +840,6 @@ e1000e_ring_free_descr_num(E1000ECore *core, const E1000ERingInfo *r)
     }
 
     g_assert_not_reached();
-    return 0;
 }
 
 static inline bool
index 6be61407715c570385d173feb27d57d413b7de57..5dffa12c64bfbc599409c2ef8ff167ca13378ef6 100644 (file)
@@ -398,7 +398,6 @@ igb_rss_calc_hash(IGBCore *core, struct NetRxPkt *pkt, E1000E_RSSInfo *info)
         break;
     default:
         g_assert_not_reached();
-        return 0;
     }
 
     return net_rx_pkt_calc_rss_hash(pkt, type, (uint8_t *) &core->mac[RSSRK]);
@@ -747,7 +746,6 @@ igb_ring_free_descr_num(IGBCore *core, const E1000ERingInfo *r)
     }
 
     g_assert_not_reached();
-    return 0;
 }
 
 static inline bool
index bb8583c7ababb07b54e0de663123e636647bc179..8aa8c4622838e84a97f5b98ae4604c7c27824cc1 100644 (file)
@@ -456,7 +456,6 @@ vmxnet3_setup_tx_offloads(VMXNET3State *s)
 
     default:
         g_assert_not_reached();
-        return false;
     }
 
     return true;