int scope, const char *expr, const char **attrs,
bool (*fn)(ADS_STRUCT *, char *, void **, void *),
void *data_area);
-char *ads_parent_dn(const char *dn);
+const char *ads_parent_dn(const char *dn);
ADS_MODLIST ads_init_mods(TALLOC_CTX *ctx);
ADS_STATUS ads_mod_str(TALLOC_CTX *ctx, ADS_MODLIST *mods,
const char *name, const char *val);
* @param dn the dn to return the parent from
* @return parent dn string
**/
-char *ads_parent_dn(const char *dn)
+const char *ads_parent_dn(const char *dn)
{
- char *p;
+ const char *p = NULL;
if (dn == NULL) {
return NULL;
LDAPMessage *res = NULL;
char *filter = NULL;
char *computer_dn = NULL;
- char *parent_dn;
+ const char *parent_dn = NULL;
char *computer_rdn = NULL;
bool need_move = False;
/* The following definitions come from param/util.c */
uint32_t get_int_param( const char* param );
-char *get_string_param( const char* param );
+const char *get_string_param( const char* param );
#endif /* _S3_LOADPARM_H */
utility function to parse an integer parameter from
"parameter = value"
**********************************************************/
-char* get_string_param( const char* param )
+const char* get_string_param( const char* param )
{
- char *p;
+ const char *p = NULL;
p = strchr( param, '=' );
if ( !p )
}
static int rwrap_create_fake_srv_rr(const char *key,
- const char *value,
+ char *value,
struct rwrap_fake_rr *rr)
{
char *str_prio;
char *str_weight;
char *str_port;
- const char *hostname;
+ char *hostname;
/* parse the value into priority, weight, port and hostname
* and check the validity */
}
static int rwrap_create_fake_uri_rr(const char *key,
- const char *value,
+ char *value,
struct rwrap_fake_rr *rr)
{
char *str_prio;
char *str_weight;
- const char *uri;
+ char *uri;
/* parse the value into priority, weight, and uri
* and check the validity */
}
static int rwrap_create_fake_soa_rr(const char *key,
- const char *value,
+ char *value,
struct rwrap_fake_rr *rr)
{
- const char *nameserver;
+ char *nameserver;
char *mailbox;
char *str_serial;
char *str_refresh;