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>
changes/25/5825/1
Sylvain Munaut 13 years ago
parent ae6aea8e12
commit 13e3e9a6bf
  1. 8
      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);

Loading…
Cancel
Save