From: Volker Lendecke Date: Thu, 18 Feb 2016 07:16:20 +0000 (+0100) Subject: loadparm: Remove an unneeded variable X-Git-Tag: tevent-0.9.28~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=415e3df6416a5318841fea7c22f2e00af746062d;p=thirdparty%2Fsamba.git loadparm: Remove an unneeded variable 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 Reviewed-by: Michael Adam Autobuild-User(master): Volker Lendecke Autobuild-Date(master): Fri Feb 19 15:56:19 CET 2016 on sn-devel-144 --- diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index 50b29e32384..1f8e5783d3a 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -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"));