Commit af758753 authored by Sebastian Ramacher's avatar Sebastian Ramacher

Remove useless casts

parent ef1aeb51
......@@ -51,7 +51,7 @@ pdf_document_open(zathura_document_t* document)
/* authenticate if password is required and given */
if (fz_needs_password(mupdf_document->ctx, mupdf_document->document) != 0) {
if (password == NULL || fz_authenticate_password(mupdf_document->ctx, mupdf_document->document, (char*) password) == 0) {
if (password == NULL || fz_authenticate_password(mupdf_document->ctx, mupdf_document->document, password) == 0) {
error = ZATHURA_ERROR_INVALID_PASSWORD;
goto error_free;
}
......@@ -109,7 +109,7 @@ pdf_document_save_as(zathura_document_t* document, void* data, const char* path)
}
fz_try (mupdf_document->ctx) {
pdf_save_document(mupdf_document->ctx, (pdf_document*) mupdf_document->document, (char*) path, NULL);
pdf_save_document(mupdf_document->ctx, (pdf_document*) mupdf_document->document, path, NULL);
} fz_catch (mupdf_document->ctx) {
return ZATHURA_ERROR_UNKNOWN;
}
......
......@@ -41,7 +41,7 @@ pdf_page_search_text(zathura_page_t* page, void* data, const char* text, zathura
fz_rect* hit_bbox = fz_malloc_array(mupdf_page->ctx, N_SEARCH_RESULTS, sizeof(fz_rect));
int num_results = fz_search_stext_page(mupdf_page->ctx, mupdf_page->text,
(char*) text, hit_bbox, N_SEARCH_RESULTS);
text, hit_bbox, N_SEARCH_RESULTS);
for (int i = 0; i < num_results; i++) {
zathura_rectangle_t* rectangle = g_malloc0(sizeof(zathura_rectangle_t));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment