mirror of https://gerrit.osmocom.org/libosmocore
vty reference: fix deprecation bit evaluation
In vty_dump_nodes(), make sure the bitwise & is evaluated first. For the deprecation flag (0x1), the practical effect is most likely identical, assuming that the boolean ! operator flips the first bit, so I expect no visible functional difference. It still was confusing and wrong to look at. Related: OS#3584 Change-Id: I1f18e0e41da4772d092d71261b9e489dc1598923
This commit is contained in:
parent
e65c8bad46
commit
cf8def25d5
|
@ -679,7 +679,7 @@ static int vty_dump_nodes(struct vty *vty)
|
|||
elem = vector_slot(cnode->cmd_vector, j);
|
||||
if (!vty_command_is_common(elem))
|
||||
continue;
|
||||
if (!elem->attr & CMD_ATTR_DEPRECATED)
|
||||
if (!(elem->attr & CMD_ATTR_DEPRECATED))
|
||||
vty_dump_element(elem, vty);
|
||||
}
|
||||
}
|
||||
|
@ -717,7 +717,7 @@ static int vty_dump_nodes(struct vty *vty)
|
|||
elem = vector_slot(cnode->cmd_vector, j);
|
||||
if (vty_command_is_common(elem))
|
||||
continue;
|
||||
if (!elem->attr & CMD_ATTR_DEPRECATED)
|
||||
if (!(elem->attr & CMD_ATTR_DEPRECATED))
|
||||
vty_dump_element(elem, vty);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue