From 486698d9fba9f945e07a93edef27776da1b4790f Mon Sep 17 00:00:00 2001 From: Marwan Tanager Date: Sun, 30 Jun 2013 18:06:48 +0200 Subject: [PATCH] Logical error fix and cleanup for zathura_jumplist_reset_current Signed-off-by: Sebastian Ramacher --- zathura.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/zathura.c b/zathura.c index 665cda0..b465cb6 100644 --- a/zathura.c +++ b/zathura.c @@ -1220,18 +1220,14 @@ zathura_jumplist_backward(zathura_t* zathura) static void zathura_jumplist_reset_current(zathura_t* zathura) { - g_return_if_fail(zathura != NULL || zathura->jumplist.cur != NULL); - - if (girara_list_iterator_has_next(zathura->jumplist.cur) == false) { - return; - } + g_return_if_fail(zathura != NULL && zathura->jumplist.cur != NULL); while (true) { - girara_list_iterator_next(zathura->jumplist.cur); - if (girara_list_iterator_has_next(zathura->jumplist.cur) == false) { return; } + + girara_list_iterator_next(zathura->jumplist.cur); } }