Commit 625db905 authored by Moritz Lipp's avatar Moritz Lipp

Removed some obsolete checks

parent 8219d48e
......@@ -157,11 +157,6 @@ cmd_info(girara_session_t* session, girara_list_t* UNUSED(argument_list))
char* tmp = zathura_document_meta_get(zathura->document, meta_fields[i].field, NULL);
if (tmp != NULL) {
char* text = g_strdup_printf("<b>%s:</b> %s\n", meta_fields[i].name, tmp);
if (text == NULL) {
g_free(tmp);
return true;
}
g_string_append(string, text);
g_free(text);
......
......@@ -72,10 +72,6 @@ list_files(zathura_t* zathura, const char* current_path, const char* current_fil
};
char* full_path = g_strdup_printf("%s%s%s", current_path, tmp, e_name);
if (full_path == NULL) {
g_free(e_name);
goto error_free;
}
if (g_file_test(full_path, G_FILE_TEST_IS_DIR) == true) {
char* tmp_path = full_path;
......@@ -138,9 +134,6 @@ cc_open(girara_session_t* session, const char* input)
}
char* tmp_path = g_strdup_printf("%s/%s", cwd, path);
if (tmp_path == NULL) {
goto error_free;
}
g_free(path);
path = tmp_path;
......@@ -150,10 +143,6 @@ cc_open(girara_session_t* session, const char* input)
bool is_dir = (path[strlen(path) - 1] == '/') ? true : false;
if ((g_file_test(path, G_FILE_TEST_IS_DIR) == TRUE) && !is_dir) {
char* tmp_path = g_strdup_printf("%s/", path);
if (tmp_path == NULL) {
goto error_free;
}
g_free(path);
path = tmp_path;
is_dir = true;
......
......@@ -234,9 +234,6 @@ zathura_db_set_fileinfo(zathura_database_t* db, const char* file, unsigned int
}
char* tmp = g_strdup_printf("%f", scale);
if (tmp == NULL) {
return false;
}
g_key_file_set_integer(db->history, file, KEY_PAGE, page);
g_key_file_set_integer(db->history, file, KEY_OFFSET, offset);
......
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