From: Matthias Clasen Date: Tue, 17 Jan 2023 12:46:57 +0000 (-0500) Subject: modules: Cosmetics X-Git-Tag: archive/raspbian/4.12.3+ds-1+rpi1~1^2^2^2~22^2~8^2~54^2~2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=a6e1c5c96a8c8755cb2fc03345ab4a0fdeace7a8;p=gtk4.git modules: Cosmetics Use g_strv_length, instead of open-coding it. --- diff --git a/gtk/gtkmodules.c b/gtk/gtkmodules.c index e505790cb4..51b0916624 100644 --- a/gtk/gtkmodules.c +++ b/gtk/gtkmodules.c @@ -146,18 +146,16 @@ get_module_path (void) char ** _gtk_get_module_path (const char *type) { - char **paths = get_module_path(); + char **paths = get_module_path (); char **path; char **result; int count = 0; - for (path = paths; *path; path++) - count++; - + count = g_strv_length (paths); result = g_new (char *, count * 4 + 1); count = 0; - for (path = get_module_path (); *path; path++) + for (path = paths; *path; path++) { result[count++] = g_build_filename (*path, GTK_BINARY_VERSION, GTK_HOST, type, NULL); result[count++] = g_build_filename (*path, GTK_BINARY_VERSION, type, NULL);