check null ptr
This commit is contained in:
parent
c5991c9844
commit
de69b253dc
1 changed files with 2 additions and 2 deletions
|
|
@ -205,7 +205,7 @@ yang2cli_var_sub(clicon_handle h,
|
||||||
}
|
}
|
||||||
type = ytype?ytype->ys_argument:NULL;
|
type = ytype?ytype->ys_argument:NULL;
|
||||||
cvtypestr = cv_type2str(cvtype);
|
cvtypestr = cv_type2str(cvtype);
|
||||||
if (strcmp(type, "identityref") == 0)
|
if (type && strcmp(type, "identityref") == 0)
|
||||||
cprintf(cb, "(");
|
cprintf(cb, "(");
|
||||||
cprintf(cb, "<%s:%s", ys->ys_argument, cvtypestr);
|
cprintf(cb, "<%s:%s", ys->ys_argument, cvtypestr);
|
||||||
/* enumeration special case completion */
|
/* enumeration special case completion */
|
||||||
|
|
@ -292,7 +292,7 @@ yang2cli_var_sub(clicon_handle h,
|
||||||
cprintf(cb, ">");
|
cprintf(cb, ">");
|
||||||
if (helptext)
|
if (helptext)
|
||||||
cprintf(cb, "(\"%s\")", helptext);
|
cprintf(cb, "(\"%s\")", helptext);
|
||||||
if (strcmp(type, "identityref") == 0)
|
if (type && strcmp(type, "identityref") == 0)
|
||||||
cprintf(cb, ")");
|
cprintf(cb, ")");
|
||||||
|
|
||||||
retval = 0;
|
retval = 0;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue