]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
loadparm: Remove an unneeded variable
authorVolker Lendecke <vl@samba.org>
Thu, 18 Feb 2016 07:16:20 +0000 (08:16 +0100)
committerVolker Lendecke <vl@samba.org>
Fri, 19 Feb 2016 14:56:19 +0000 (15:56 +0100)
When reviewing the patch for bug 11740 I found that the definition of
"num_to_alloc" was not part of the patch text, I had to look it up
in context. Unnecessary I believe.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Fri Feb 19 15:56:19 CET 2016 on sn-devel-144

source3/param/loadparm.c

index 50b29e323849e5239a13556f1c8b8335e075510a..1f8e5783d3ae3a11a382c22e4099b6e2900bed96 100644 (file)
@@ -1372,7 +1372,6 @@ static void free_service_byindex(int idx)
 static int add_a_service(const struct loadparm_service *pservice, const char *name)
 {
        int i;
-       int num_to_alloc = iNumServices + 1;
        struct loadparm_service **tsp = NULL;
 
        /* it might already exist */
@@ -1393,7 +1392,7 @@ static int add_a_service(const struct loadparm_service *pservice, const char *na
                /* if not, then create one */
                tsp = talloc_realloc(NULL, ServicePtrs,
                                     struct loadparm_service *,
-                                    num_to_alloc);
+                                    iNumServices + 1);
                if (tsp == NULL) {
                        DEBUG(0, ("add_a_service: failed to enlarge "
                                  "ServicePtrs!\n"));