diff --git a/zathura/adjustment.c b/zathura/adjustment.c index 1cd31b3..9a10da5 100644 --- a/zathura/adjustment.c +++ b/zathura/adjustment.c @@ -13,7 +13,7 @@ page_calc_height_width(zathura_document_t* document, double height, g_return_val_if_fail(document != NULL && page_height != NULL && page_width != NULL, 0.0); double scale = zathura_document_get_scale(document); - if (rotate && zathura_document_get_rotation(document) % 180) { + if (rotate == true && zathura_document_get_rotation(document) % 180 != 0) { *page_width = round(height * scale); *page_height = round(width * scale); scale = MAX(*page_width / height, *page_height / width); diff --git a/zathura/render.c b/zathura/render.c index f18ceb4..de750cb 100644 --- a/zathura/render.c +++ b/zathura/render.c @@ -845,7 +845,7 @@ render_all(zathura_t* zathura) /* unmark all pages */ const unsigned int number_of_pages = zathura_document_get_number_of_pages(zathura->document); - for (unsigned int page_id = 0; page_id < number_of_pages; page_id++) { + for (unsigned int page_id = 0; page_id < number_of_pages; ++page_id) { zathura_page_t* page = zathura_document_get_page(zathura->document, page_id); unsigned int page_height = 0, page_width = 0;