summaryrefslogtreecommitdiff
path: root/source3/param
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-11-21 20:23:35 +0100
committerVolker Lendecke <vl@samba.org>2009-11-21 20:54:10 +0100
commitcf2febf3d1c591effc036a44eb0870aaf95c6848 (patch)
tree4096b185e4f9c156e209019385a055977b9cd726 /source3/param
parentc85a4c9ba4a7de65a7850f6f9708df66bd24deea (diff)
downloadsamba-cf2febf3d1c591effc036a44eb0870aaf95c6848.tar.gz
samba-cf2febf3d1c591effc036a44eb0870aaf95c6848.tar.bz2
samba-cf2febf3d1c591effc036a44eb0870aaf95c6848.zip
s3: Make alloc_sub_basic() static
Diffstat (limited to 'source3/param')
-rw-r--r--source3/param/loadparm.c33
1 files changed, 17 insertions, 16 deletions
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 17a4e2dce3..b7eb80e3f6 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -7074,7 +7074,6 @@ bool lp_file_list_changed(void)
DEBUG(6, ("lp_file_list_changed()\n"));
while (f) {
- char *n2 = NULL;
time_t mod_time;
if (strequal(f->name, INCLUDE_REGISTRY_NAME)) {
@@ -7090,9 +7089,11 @@ bool lp_file_list_changed(void)
return true;
}
} else {
- n2 = alloc_sub_basic(get_current_username(),
- current_user_info.domain,
- f->name);
+ char *n2 = NULL;
+ n2 = talloc_sub_basic(talloc_tos(),
+ get_current_username(),
+ current_user_info.domain,
+ f->name);
if (!n2) {
return false;
}
@@ -7116,7 +7117,7 @@ bool lp_file_list_changed(void)
above. */
return true;
}
- SAFE_FREE(n2);
+ TALLOC_FREE(n2);
}
f = f->next;
}
@@ -7133,12 +7134,12 @@ bool lp_file_list_changed(void)
static bool handle_netbios_name(int snum, const char *pszParmValue, char **ptr)
{
bool ret;
- char *netbios_name = alloc_sub_basic(get_current_username(),
- current_user_info.domain,
- pszParmValue);
+ char *netbios_name = talloc_sub_basic(
+ talloc_tos(), get_current_username(), current_user_info.domain,
+ pszParmValue);
ret = set_global_myname(netbios_name);
- SAFE_FREE(netbios_name);
+ TALLOC_FREE(netbios_name);
string_set(&Globals.szNetbiosName,global_myname());
DEBUG(4, ("handle_netbios_name: set global_myname to: %s\n",
@@ -7217,9 +7218,9 @@ static bool handle_include(int snum, const char *pszParmValue, char **ptr)
}
}
- fname = alloc_sub_basic(get_current_username(),
- current_user_info.domain,
- pszParmValue);
+ fname = talloc_sub_basic(talloc_tos(), get_current_username(),
+ current_user_info.domain,
+ pszParmValue);
add_to_file_list(pszParmValue, fname);
@@ -7230,12 +7231,12 @@ static bool handle_include(int snum, const char *pszParmValue, char **ptr)
include_depth++;
ret = pm_process(fname, do_section, do_parameter, NULL);
include_depth--;
- SAFE_FREE(fname);
+ TALLOC_FREE(fname);
return ret;
}
DEBUG(2, ("Can't find include file %s\n", fname));
- SAFE_FREE(fname);
+ TALLOC_FREE(fname);
return true;
}
@@ -9117,7 +9118,7 @@ bool lp_load_ex(const char *pszFname,
iServiceIndex = -1;
if (lp_config_backend_is_file()) {
- n2 = alloc_sub_basic(get_current_username(),
+ n2 = talloc_sub_basic(talloc_tos(), get_current_username(),
current_user_info.domain,
pszFname);
if (!n2) {
@@ -9127,7 +9128,7 @@ bool lp_load_ex(const char *pszFname,
add_to_file_list(pszFname, n2);
bRetval = pm_process(n2, do_section, do_parameter, NULL);
- SAFE_FREE(n2);
+ TALLOC_FREE(n2);
/* finish up the last section */
DEBUG(4, ("pm_process() returned %s\n", BOOLSTR(bRetval)));