src: Print member's name in CHOICE print
Sometimes, if the choice is a null or integer or ...
it's not easy to know what has really been selected without
the choice member name.
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
diff --git a/src/constr_CHOICE.c b/src/constr_CHOICE.c
index a9eb719..4f0d992 100644
--- a/src/constr_CHOICE.c
+++ b/src/constr_CHOICE.c
@@ -1014,11 +1014,9 @@
}
/* Print member's name and stuff */
- if(0) {
- if(cb(elm->name, strlen(elm->name), app_key) < 0
- || cb(": ", 2, app_key) < 0)
- return -1;
- }
+ if(cb(elm->name, strlen(elm->name), app_key) < 0
+ || cb(": ", 2, app_key) < 0)
+ return -1;
return elm->type->print_struct(elm->type, memb_ptr, ilevel,
cb, app_key);