mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-12-28 06:56:00 +01:00
Merge two ifs
This commit is contained in:
parent
155e538d26
commit
d80c654b8b
2 changed files with 8 additions and 12 deletions
|
@ -463,15 +463,12 @@ plain_remove_bookmark(zathura_database_t* db, const char* file, const char* id)
|
|||
}
|
||||
|
||||
char* name = prepare_filename(file);
|
||||
if (g_key_file_has_group(priv->bookmarks, name) == TRUE) {
|
||||
if (g_key_file_remove_key(priv->bookmarks, name, id, NULL) == TRUE) {
|
||||
|
||||
if (g_key_file_has_group(priv->bookmarks, name) == TRUE && g_key_file_remove_key(priv->bookmarks, name, id, NULL) == TRUE) {
|
||||
zathura_db_write_key_file_to_file(priv->bookmark_path, priv->bookmarks);
|
||||
g_free(name);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
g_free(name);
|
||||
|
||||
return false;
|
||||
|
|
|
@ -155,13 +155,12 @@ check_column_type(sqlite3* session, const char* table, const char* col, const ch
|
|||
*res = false;
|
||||
|
||||
while (sqlite3_step(stmt) == SQLITE_ROW) {
|
||||
if (strcmp((const char*) sqlite3_column_text(stmt, 1), col) == 0) {
|
||||
if (strcmp((const char*) sqlite3_column_text(stmt, 2), type) == 0) {
|
||||
if (strcmp((const char*) sqlite3_column_text(stmt, 1), col) == 0 &&
|
||||
strcmp((const char*) sqlite3_column_text(stmt, 2), type) == 0) {
|
||||
*res = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (*res == false) {
|
||||
girara_debug("Column '%s' in table '%s' has wrong type.", col, table);
|
||||
|
|
Loading…
Reference in a new issue