summaryrefslogtreecommitdiff
path: root/scripts/gdb/linux/utils.py
diff options
context:
space:
mode:
authorNiklas Schnelle <schnelle@linux.ibm.com>2024-12-13 16:47:29 +0300
committerAlexander Gordeev <agordeev@linux.ibm.com>2024-12-16 18:14:26 +0300
commit7832b3047d10e2c1f9cfed49de818a38aea251f6 (patch)
tree55f8a36cc4909aad2ae085be6cde924ffa7de5d0 /scripts/gdb/linux/utils.py
parent4ec6054e7321dc24ebccaa08b3af0d590f5666e6 (diff)
downloadlinux-7832b3047d10e2c1f9cfed49de818a38aea251f6.tar.xz
s390/debug: Simplify and document debug_next_entry() logic
Contrary to convention debug_next_entry() returns a falsy 0 value if there are more entries and a truthy 1 value when there are no more entries. As there is only one caller just reverse this logic to be less surprising and document the behavior in a kdoc comment. Also replace the goto with an early return. In the future this allows using it in a do {} while (debug_next_entry(...)) loop. Reviewed-by: Halil Pasic <pasic@linux.ibm.com> Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com> Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
Diffstat (limited to 'scripts/gdb/linux/utils.py')
0 files changed, 0 insertions, 0 deletions