Scalars do not have a .0 suffix

See https://github.com/clicon/clixon/issues/401
This commit is contained in:
stass 2023-01-23 19:46:39 +02:00 committed by Olof hagsand
parent a5220805b1
commit 3436a19ee4
4 changed files with 62 additions and 61 deletions

View file

@ -557,6 +557,7 @@ mibyang_traverse(clicon_handle h,
yang_stmt *ys = NULL;
yang_stmt *yp;
int ret;
static oid zero_oid = 0;
clicon_debug(1, "%s %s", __FUNCTION__, yang_argument_get(yn));
switch(yang_keyword_get(yn)){
@ -566,7 +567,7 @@ mibyang_traverse(clicon_handle h,
goto ok;
break;
case Y_LEAF:
if (mibyang_leaf_register(h, yn, NULL, NULL, 0) < 0)
if (mibyang_leaf_register(h, yn, NULL, &zero_oid, OID_LENGTH(zero_oid)) < 0)
goto done;
break;
case Y_CONTAINER: /* See list case */