From: Volker Lendecke Date: Wed, 7 Jan 2026 11:46:42 +0000 (+0100) Subject: lib: Move a variable declaration closer to its use X-Git-Tag: tdb-1.4.15~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4450a4e6a83b0b3d6cd7a569f4a546836c223653;p=thirdparty%2Fsamba.git lib: Move a variable declaration closer to its use Signed-off-by: Volker Lendecke Reviewed-by: Anoop C S --- diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index 2a958057e66..d7652661d57 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -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 *,