diff options
author | Garming Sam <garming@catalyst.net.nz> | 2014-02-19 13:53:53 +1300 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2014-05-07 19:49:15 +0200 |
commit | 2f47965ba920ea65e100ac010772c0e91ced89de (patch) | |
tree | 3c2893a5c8f6ab502ffaf82125fb3b61f56cc3fd /source3/param/loadparm.c | |
parent | 6f8b2ab54f3eee23f1b63e269f8a5eca02340f09 (diff) | |
download | samba-2f47965ba920ea65e100ac010772c0e91ced89de.tar.gz samba-2f47965ba920ea65e100ac010772c0e91ced89de.tar.xz samba-2f47965ba920ea65e100ac010772c0e91ced89de.zip |
s3:param: avoid the use the global variable iServiceIndex in handle_copy
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3/param/loadparm.c')
-rw-r--r-- | source3/param/loadparm.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index ddf8f45ef6..11b1486252 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -2641,13 +2641,13 @@ static bool handle_copy(struct loadparm_context *unused, int snum, const char *p DEBUG(3, ("Copying service from service %s\n", pszParmValue)); if ((iTemp = getservicebyname(pszParmValue, NULL)) >= 0) { - if (iTemp == iServiceIndex) { + if (iTemp == snum) { DEBUG(0, ("Can't copy service %s - unable to copy self!\n", pszParmValue)); } else { - copy_service(ServicePtrs[iServiceIndex], - ServicePtrs[iTemp], - ServicePtrs[iServiceIndex]->copymap); - string_set(ServicePtrs[iServiceIndex], ptr, pszParmValue); + copy_service(ServicePtrs[snum], + serviceTemp, + ServicePtrs[snum]->copymap); + string_set(ServicePtrs[snum], ptr, pszParmValue); bRetval = true; } } else { |