Use g_strv_length

Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
This commit is contained in:
Sebastian Ramacher 2015-11-20 15:21:21 +01:00
parent d7b06ca3fc
commit b2189277bb

View file

@ -263,11 +263,7 @@ find_first_page_column(const char* first_page_column_list,
/* split settings list */
char** settings = g_strsplit(first_page_column_list, ":", pages_per_row+1);
size_t settings_size = 0;
while (settings[settings_size] != NULL) {
++settings_size;
}
const size_t settings_size = g_strv_length(settings);
/* read setting value corresponding to the specified pages per row */
unsigned int index = pages_per_row - 1;