gnode: Eliminate implicit signed-to-unsigned integer conversion
commitae7895002b993022694c2435a12e4449dbac1d87
authorPhilip Withnall <philip@tecnocode.co.uk>
Sat, 21 Jun 2014 10:27:48 +0000 (21 11:27 +0100)
committerPhilip Withnall <withnall@endlessm.com>
Tue, 28 Nov 2017 14:16:25 +0000 (28 14:16 +0000)
treec0b967638d9b3aff81bcbae8c4496395cb1a2afc
parentb16d7fc1a77021455fb370fa2754a03c67c9e1d4
gnode: Eliminate implicit signed-to-unsigned integer conversion

When doing a level traverse of a GNode with depth of -1, the depth was
implicitly being converted to an unsigned integer. This worked (making
the depth limit G_MAXUINT), but was a bit mystical.

Change g_node_depth_traverse_level() to explicitly take a signed depth
and handle it appropriately.

Coverity issue: #1159465

https://bugzilla.gnome.org/show_bug.cgi?id=732003
glib/gnode.c