]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
lib: Move a variable declaration closer to its use
authorVolker Lendecke <vl@samba.org>
Wed, 7 Jan 2026 11:46:42 +0000 (12:46 +0100)
committerVolker Lendecke <vl@samba.org>
Tue, 20 Jan 2026 11:53:35 +0000 (11:53 +0000)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
source3/param/loadparm.c

index 2a958057e66e76ec09916bc93cca6a15cb06726c..d7652661d570d1f620a5dccbcbb3a5cbc92df0f0 100644 (file)
@@ -1539,7 +1539,6 @@ static void free_service_byindex(int idx)
 static int add_a_service(const struct loadparm_service *pservice, const char *name)
 {
        int i;
-       struct loadparm_service **tsp = NULL;
 
        /* it might already exist */
        if (name) {
@@ -1556,6 +1555,8 @@ static int add_a_service(const struct loadparm_service *pservice, const char *na
                }
        }
        if (i == iNumServices) {
+               struct loadparm_service **tsp = NULL;
+
                /* if not, then create one */
                tsp = talloc_realloc(NULL, ServicePtrs,
                                     struct loadparm_service *,