From 644c9b8819dd3249e00654285a60d06a098c2534 Mon Sep 17 00:00:00 2001 From: cnjhb Date: Sat, 28 Feb 2026 16:28:12 +0800 Subject: [PATCH] chore: place `xdgconfigdirs` inside the for loop. --- awesome.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/awesome.c b/awesome.c index c4fbbbe444..4958586cbd 100644 --- a/awesome.c +++ b/awesome.c @@ -606,9 +606,7 @@ main(int argc, char **argv) fatal("Function xdgInitHandle() failed, is $HOME unset?"); /* add XDG_CONFIG_DIR as include path */ - const char * const *xdgconfigdirs = xdgSearchableConfigDirectories(&xdg); - for(; *xdgconfigdirs; xdgconfigdirs++) - { + for (const char* const* xdgconfigdirs = xdgSearchableConfigDirectories(&xdg); *xdgconfigdirs; xdgconfigdirs++) { /* Append /awesome to *xdgconfigdirs */ const char *suffix = "/awesome"; size_t len = a_strlen(*xdgconfigdirs) + a_strlen(suffix) + 1;