You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following code from ncx_compare_nums() does not work
/* check if any leading zeroes */
if (temp1 == 0) {
if (num1->dec.zeroes < num2->dec.zeroes) {
return 1;
} else if (num1->dec.zeroes > num2->dec.zeroes) {
return -1;
} /* else need to compare fraction parts */
}
It fails for cases where dec.zeroes == 0 due to dec.val == 0. Either tremove this code entirely or add cases to cover situations where dec.zeroes == 0 due to dec.val == 0.
Example:
leaf sample-configuration {
type decimal64 { fraction-digits 4; range "0 .. 1.9999";}
default 0.001;
}
yangdump will consider the default value of 0.001 invalid since num1->dec.zeroes == 2 > num2->dec-zeroes == 0 causing return -1 while comparing the lower range (0)
The text was updated successfully, but these errors were encountered:
The following code from ncx_compare_nums() does not work
It fails for cases where dec.zeroes == 0 due to dec.val == 0. Either tremove this code entirely or add cases to cover situations where dec.zeroes == 0 due to dec.val == 0.
Example:
yangdump will consider the default value of 0.001 invalid since num1->dec.zeroes == 2 > num2->dec-zeroes == 0 causing return -1 while comparing the lower range (0)
The text was updated successfully, but these errors were encountered: