mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2025-01-15 09:36:00 +01:00
Reduce the scope of val_list
This commit is contained in:
parent
7b8f5d17cb
commit
9e85c2f7c8
1 changed files with 2 additions and 3 deletions
|
@ -394,14 +394,13 @@ plain_load_bookmarks(zathura_database_t* db, const char* file)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
char **val_list = NULL;
|
|
||||||
gsize num_vals = 0;
|
gsize num_vals = 0;
|
||||||
|
|
||||||
for (gsize i = 0; i < num_keys; i++) {
|
for (gsize i = 0; i < num_keys; i++) {
|
||||||
zathura_bookmark_t* bookmark = g_malloc0(sizeof(zathura_bookmark_t));
|
zathura_bookmark_t* bookmark = g_malloc0(sizeof(zathura_bookmark_t));
|
||||||
|
|
||||||
bookmark->id = g_strdup(keys[i]);
|
bookmark->id = g_strdup(keys[i]);
|
||||||
val_list = g_key_file_get_string_list(priv->bookmarks, name, keys[i], &num_vals, NULL);
|
char **val_list = g_key_file_get_string_list(priv->bookmarks, name, keys[i], &num_vals, NULL);
|
||||||
|
|
||||||
bookmark->page = atoi(val_list[0]);
|
bookmark->page = atoi(val_list[0]);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue