From bf8ddd52c62b63c4359f653c5e15c273e1eb121e Mon Sep 17 00:00:00 2001 From: Gwenhael Le Moine Date: Thu, 14 Nov 2024 16:03:13 +0100 Subject: [PATCH] optmization --- src/x49gpng/options.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/x49gpng/options.c b/src/x49gpng/options.c index 5865b98..b8a7a81 100644 --- a/src/x49gpng/options.c +++ b/src/x49gpng/options.c @@ -249,10 +249,8 @@ void config_init( char* progname, int argc, char* argv[] ) } } - if ( opt.datadir == NULL ) { - const char* user_config_dir = g_get_user_config_dir(); - opt.datadir = g_build_filename( user_config_dir, progname, NULL ); - } + if ( opt.datadir == NULL ) + opt.datadir = g_build_filename( g_get_user_config_dir(), progname, NULL ); const char* config_lua_filename = g_build_filename( opt.datadir, "config.lua", NULL );