diff options
author | Ryan Lortie <desrt@desrt.ca> | 2012-07-08 10:42:09 -0400 |
---|---|---|
committer | Ryan Lortie <desrt@desrt.ca> | 2012-07-08 10:42:09 -0400 |
commit | 0d25676ca1f7721564687cb4eabf43c5dfadd8ea (patch) | |
tree | 1662b364e869b9181d1a9891adae8d8cc00f57a0 | |
parent | 9fca034e9fef29e17bdba9aa08a50d9fee28d55e (diff) | |
download | dconf-0d25676ca1f7721564687cb4eabf43c5dfadd8ea.tar.gz |
gvdb test: fix logic for infinite walks
We were using a negative variable for the value of a counter designed to
bound the number of open() calls in a walk. We were decrementing it in
that case (which is fine since it would never reach zero again anyway).
It was a bit ugly, though.
-rw-r--r-- | tests/gvdb.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/gvdb.c b/tests/gvdb.c index 4f9c398..35a16a2 100644 --- a/tests/gvdb.c +++ b/tests/gvdb.c @@ -204,7 +204,8 @@ walk_open (const gchar *name, if (accept_this_many_opens) { - accept_this_many_opens--; + if (accept_this_many_opens > 0) + accept_this_many_opens--; return TRUE; } |