aboutsummaryrefslogtreecommitdiffstats
path: root/loadparm.c
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2009-01-18 22:40:17 -0800
committerWayne Davison <wayned@samba.org>2009-01-18 22:40:17 -0800
commitb53c202e450445070368c32b9d97ae8b179ba66f (patch)
tree718ac04d12bbc3d5aec591d115f8e68fc82aa7fa /loadparm.c
parentaef68d7892580f4d554281a69cce4d7b6bad0359 (diff)
downloadandroid_external_rsync-b53c202e450445070368c32b9d97ae8b179ba66f.tar.gz
android_external_rsync-b53c202e450445070368c32b9d97ae8b179ba66f.tar.bz2
android_external_rsync-b53c202e450445070368c32b9d97ae8b179ba66f.zip
A couple minor function-call tweaks.
Diffstat (limited to 'loadparm.c')
-rw-r--r--loadparm.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/loadparm.c b/loadparm.c
index 76edc2e1..b473ce90 100644
--- a/loadparm.c
+++ b/loadparm.c
@@ -440,7 +440,7 @@ static void string_set(char **s, const char *v)
return;
}
if (!(*s = strdup(v)))
- exit_cleanup(RERR_MALLOC);
+ out_of_memory("string_set");
}
/* Copy the local_vars, duplicating any strings in the source. */
@@ -518,16 +518,13 @@ static int strwicmp(char *psz1, char *psz2)
}
/* Find a section by name. Otherwise works like get_section. */
-static int getsectionbyname(char *name, local_vars *psectionDest)
+static int getsectionbyname(char *name)
{
int i;
for (i = section_list.count - 1; i >= 0; i--) {
- if (strwicmp(iSECTION(i).name, name) == 0) {
- if (psectionDest != NULL)
- copy_section(psectionDest, &iSECTION(i));
+ if (strwicmp(iSECTION(i).name, name) == 0)
break;
- }
}
return i;
@@ -541,7 +538,7 @@ static int add_a_section(char *name)
/* it might already exist */
if (name) {
- i = getsectionbyname(name, NULL);
+ i = getsectionbyname(name);
if (i >= 0)
return i;
}