aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHelmut Eller2026-02-20 13:50:09 +0100
committerHelmut Eller2026-02-20 13:50:09 +0100
commit3ed4886fe6daa3fae172cb710bf939bc9d2ac4e2 (patch)
treedfdf10f06d214c6f9b473ef9d15d8f56ef53bb14
parent1cb0262ce86f2c7432a357ecdf5a95eaba20650e (diff)
downloademacs-feature/igc2.tar.gz
emacs-feature/igc2.zip
Add some assertionsfeature/igc2
* src./igc.c (igc_header_type, igc_header_hash, igc_header_nwords): Check the tag in the non-exthdr case.
-rw-r--r--src/igc.c3
1 files changed, 3 insertions, 0 deletions
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)
635{ 635{
636 if (header_tag (h) == IGC_TAG_EXTHDR) 636 if (header_tag (h) == IGC_TAG_EXTHDR)
637 return header_exthdr (h)->obj_type; 637 return header_exthdr (h)->obj_type;
638 igc_assert (header_tag (h) == IGC_TAG_OBJ);
638 return header_type (h); 639 return header_type (h);
639} 640}
640 641
@@ -643,6 +644,7 @@ igc_header_hash (union igc_header *h)
643{ 644{
644 if (header_tag (h) == IGC_TAG_EXTHDR) 645 if (header_tag (h) == IGC_TAG_EXTHDR)
645 return header_exthdr (h)->hash; 646 return header_exthdr (h)->hash;
647 igc_assert (header_tag (h) == IGC_TAG_OBJ);
646 return header_hash (h); 648 return header_hash (h);
647} 649}
648 650
@@ -651,6 +653,7 @@ igc_header_nwords (const union igc_header *h)
651{ 653{
652 if (header_tag (h) == IGC_TAG_EXTHDR) 654 if (header_tag (h) == IGC_TAG_EXTHDR)
653 return header_exthdr (h)->nwords; 655 return header_exthdr (h)->nwords;
656 igc_assert (header_tag (h) == IGC_TAG_OBJ);
654 return header_nwords (h); 657 return header_nwords (h);
655} 658}
656 659