Marwan Tanager
2013-06-30 16:06:48 UTC
---
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);
}
}
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);
}
}
--
1.7.10.4
1.7.10.4