aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSylvain Munaut <tnt@246tNt.com>2010-06-14 23:33:55 +0200
committerSylvain Munaut <tnt@246tNt.com>2010-06-14 23:33:55 +0200
commit13e3e9a6bf9b90b6346da078ce7c697777593a4a (patch)
treea7ce41054d02dd94e593dd050828e735322c5c8a
parentae6aea8e12ef342211a04fd284c4a9a1876130ae (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 a9eb719..4f0d992 100644
--- a/skeletons/constr_CHOICE.c
+++ b/skeletons/constr_CHOICE.c
@@ -1014,11 +1014,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);