From 3ed4886fe6daa3fae172cb710bf939bc9d2ac4e2 Mon Sep 17 00:00:00 2001 From: Helmut Eller Date: Fri, 20 Feb 2026 13:50:09 +0100 Subject: Add some assertions * src./igc.c (igc_header_type, igc_header_hash, igc_header_nwords): Check the tag in the non-exthdr case. --- src/igc.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/igc.c b/src/igc.c index 3e39772d49c..c8862d200da 100644 --- a/src/igc.c +++ b/src/igc.c @@ -635,6 +635,7 @@ igc_header_type (union igc_header *h) { if (header_tag (h) == IGC_TAG_EXTHDR) return header_exthdr (h)->obj_type; + igc_assert (header_tag (h) == IGC_TAG_OBJ); return header_type (h); } @@ -643,6 +644,7 @@ igc_header_hash (union igc_header *h) { if (header_tag (h) == IGC_TAG_EXTHDR) return header_exthdr (h)->hash; + igc_assert (header_tag (h) == IGC_TAG_OBJ); return header_hash (h); } @@ -651,6 +653,7 @@ igc_header_nwords (const union igc_header *h) { if (header_tag (h) == IGC_TAG_EXTHDR) return header_exthdr (h)->nwords; + igc_assert (header_tag (h) == IGC_TAG_OBJ); return header_nwords (h); } -- cgit v1.2.1