goto done;
}
- tmp_services = TALLOC_ARRAY(tmp_ctx, struct smbconf_service *,
+ tmp_services = talloc_array(tmp_ctx, struct smbconf_service *,
tmp_num_shares);
if (tmp_services == NULL) {
#ifndef __LIBSMBCONF_PRIVATE_H__
#define __LIBSMBCONF_PRIVATE_H__
+#ifndef GLOBAL_NAME
+#define GLOBAL_NAME "global"
+#endif
+
+#include "lib/smbconf/smbconf.h"
+
struct smbconf_ops {
WERROR (*init)(struct smbconf_ctx *ctx, const char *path);
int (*shutdown)(struct smbconf_ctx *ctx);
cache->current_share = cache->num_shares;
cache->num_shares++;
- cache->param_names = TALLOC_REALLOC_ARRAY(cache,
+ cache->param_names = talloc_realloc(cache,
cache->param_names,
char **,
cache->num_shares);
}
cache->param_names[cache->current_share] = NULL;
- cache->param_values = TALLOC_REALLOC_ARRAY(cache,
+ cache->param_values = talloc_realloc(cache,
cache->param_values,
char **,
cache->num_shares);
}
cache->param_values[cache->current_share] = NULL;
- cache->num_params = TALLOC_REALLOC_ARRAY(cache,
+ cache->num_params = talloc_realloc(cache,
cache->num_params,
uint32_t,
cache->num_shares);
smbconf_txt_flush_cache(ctx);
}
- pd(ctx)->cache = TALLOC_ZERO_P(pd(ctx), struct txt_cache);
+ pd(ctx)->cache = talloc_zero(pd(ctx), struct txt_cache);
if (pd(ctx)->cache == NULL) {
return WERR_NOMEM;
return WERR_NOMEM;
}
- ctx->data = TALLOC_ZERO_P(ctx, struct txt_private_data);
+ ctx->data = talloc_zero(ctx, struct txt_private_data);
if (ctx->data == NULL) {
return WERR_NOMEM;
}
tmp_ctx = talloc_stackframe();
- tmp_service = TALLOC_ZERO_P(tmp_ctx, struct smbconf_service);
+ tmp_service = talloc_zero(tmp_ctx, struct smbconf_service);
if (tmp_service == NULL) {
werr = WERR_NOMEM;
goto done;
return WERR_INVALID_PARAM;
}
- ctx = TALLOC_ZERO_P(mem_ctx, struct smbconf_ctx);
+ ctx = talloc_zero(mem_ctx, struct smbconf_ctx);
if (ctx == NULL) {
return WERR_NOMEM;
}
return WERR_INVALID_PARAM;
}
- new_array = TALLOC_REALLOC_ARRAY(mem_ctx, *array, char *, count + 1);
+ new_array = talloc_realloc(mem_ctx, *array, char *, count + 1);
if (new_array == NULL) {
return WERR_NOMEM;
}