summaryrefslogtreecommitdiff
path: root/source3/param/loadparm.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2006-06-20 20:43:05 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:18:53 -0500
commitadc252c27511b8aee09a8b4ef6e7a50894514837 (patch)
tree8ecd7664aa359ceaea9f716b170a47ceefa5e4d6 /source3/param/loadparm.c
parentca8b86c51a5941555d61b02b82fb6b7c4e674f08 (diff)
downloadsamba-adc252c27511b8aee09a8b4ef6e7a50894514837.tar.gz
samba-adc252c27511b8aee09a8b4ef6e7a50894514837.tar.bz2
samba-adc252c27511b8aee09a8b4ef6e7a50894514837.zip
r16429: Fix final 4 Klocwork bugs we're going to fix before
release - #785, #786, #787, #788. Jeremy. (This used to be commit 9017547cccadeecb80f3db58a43838dc656fce2f)
Diffstat (limited to 'source3/param/loadparm.c')
-rw-r--r--source3/param/loadparm.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 2ef1c4df2f..a3a41c7664 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -3244,9 +3244,9 @@ static BOOL handle_debug_list( int snum, const char *pszParmValueIn, char **ptr
Handle ldap suffixes - default to ldapsuffix if sub-suffixes are not defined.
***************************************************************************/
-static char* append_ldap_suffix( const char *str )
+static const char *append_ldap_suffix( const char *str )
{
- char *suffix_string;
+ const char *suffix_string;
if (!lp_talloc)
@@ -3255,13 +3255,13 @@ static char* append_ldap_suffix( const char *str )
suffix_string = talloc_asprintf( lp_talloc, "%s,%s", str, Globals.szLdapSuffix );
if ( !suffix_string ) {
DEBUG(0,("append_ldap_suffix: talloc_asprintf() failed!\n"));
- return NULL;
+ return "";
}
return suffix_string;
}
-char *lp_ldap_machine_suffix(void)
+const char *lp_ldap_machine_suffix(void)
{
if (Globals.szLdapMachineSuffix[0])
return append_ldap_suffix(Globals.szLdapMachineSuffix);
@@ -3269,7 +3269,7 @@ char *lp_ldap_machine_suffix(void)
return lp_string(Globals.szLdapSuffix);
}
-char *lp_ldap_user_suffix(void)
+const char *lp_ldap_user_suffix(void)
{
if (Globals.szLdapUserSuffix[0])
return append_ldap_suffix(Globals.szLdapUserSuffix);
@@ -3277,7 +3277,7 @@ char *lp_ldap_user_suffix(void)
return lp_string(Globals.szLdapSuffix);
}
-char *lp_ldap_group_suffix(void)
+const char *lp_ldap_group_suffix(void)
{
if (Globals.szLdapGroupSuffix[0])
return append_ldap_suffix(Globals.szLdapGroupSuffix);
@@ -3285,7 +3285,7 @@ char *lp_ldap_group_suffix(void)
return lp_string(Globals.szLdapSuffix);
}
-char *lp_ldap_idmap_suffix(void)
+const char *lp_ldap_idmap_suffix(void)
{
if (Globals.szLdapIdmapSuffix[0])
return append_ldap_suffix(Globals.szLdapIdmapSuffix);