YANG optimization: move "when" and "mymodule" to external maps
This commit is contained in:
parent
275cefbae7
commit
c08dac2e5d
13 changed files with 247 additions and 314 deletions
|
|
@ -2089,7 +2089,6 @@ yang_check_when_xpath(cxobj *xn,
|
|||
int nr = 0;
|
||||
cvec *nsc = NULL;
|
||||
int xmalloc = 0; /* ugly help variable to clean temporary object */
|
||||
int nscmalloc = 0; /* ugly help variable to remove */
|
||||
|
||||
/* First variant */
|
||||
if ((xpath = yang_when_xpath_get(yn)) != NULL){
|
||||
|
|
@ -2111,7 +2110,6 @@ yang_check_when_xpath(cxobj *xn,
|
|||
x = xn;
|
||||
if (xml_nsctx_yang(yn, &nsc) < 0)
|
||||
goto done;
|
||||
nscmalloc++;
|
||||
*hit = 1;
|
||||
}
|
||||
else
|
||||
|
|
@ -2128,7 +2126,7 @@ yang_check_when_xpath(cxobj *xn,
|
|||
done:
|
||||
if (xmalloc)
|
||||
xml_purge(x);
|
||||
if (nsc && nscmalloc)
|
||||
if (nsc)
|
||||
xml_nsctx_free(nsc);
|
||||
return retval;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue