aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSylvain Munaut <tnt@246tNt.com>2010-06-14 23:33:55 +0200
committerNeels Hofmeyr <neels@hofmeyr.de>2016-07-06 17:05:48 +0200
commitcc803bd0b82cc6b0e3e5cea40fd24c338de2b7d2 (patch)
tree85a07d67401ef528ff8d79f253e05ab52d62a149
parent96ed86a274ff7b16d384babad3fb430b2217ff2d (diff)
skeletons: 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>
-rw-r--r--skeletons/constr_CHOICE.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/skeletons/constr_CHOICE.c b/skeletons/constr_CHOICE.c
index dbca5ae8..2d4d5d47 100644
--- a/skeletons/constr_CHOICE.c
+++ b/skeletons/constr_CHOICE.c
@@ -1179,11 +1179,9 @@ CHOICE_print(asn_TYPE_descriptor_t *td, const void *sptr, int ilevel,
}
/* 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);