Changed singnature of ys_real_module and improved error handling

This commit is contained in:
Olof hagsand 2020-08-27 11:01:09 +02:00
parent 1a2e074539
commit 576533ed82
7 changed files with 52 additions and 29 deletions

View file

@ -716,12 +716,13 @@ xml2json1_cbuf(cbuf *cb,
enum childtype childt;
enum array_element_type xc_arraytype;
yang_stmt *ys;
yang_stmt *ymod; /* yang module */
yang_stmt *ymod = NULL; /* yang module */
int commas;
char *modname = NULL;
if ((ys = xml_spec(x)) != NULL){
ymod = ys_real_module(ys);
if (ys_real_module(ys, &ymod) < 0)
goto done;
modname = yang_argument_get(ymod);
if (modname0 && strcmp(modname, modname0) == 0)
modname=NULL;