Changeset 745 for trunk/server/lib/smbconf/smbconf_util.c
- Timestamp:
- Nov 27, 2012, 4:43:17 PM (13 years ago)
- Location:
- trunk/server
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/server
- Property svn:mergeinfo changed
/vendor/current merged: 581,587,591,594,597,600,615,618,740
- Property svn:mergeinfo changed
-
trunk/server/lib/smbconf/smbconf_util.c
r414 r745 40 40 * should be called. 41 41 */ 42 WERRORsmbconf_init_internal(TALLOC_CTX *mem_ctx, struct smbconf_ctx **conf_ctx,42 sbcErr smbconf_init_internal(TALLOC_CTX *mem_ctx, struct smbconf_ctx **conf_ctx, 43 43 const char *path, struct smbconf_ops *ops) 44 44 { 45 WERROR werr = WERR_OK;45 sbcErr err = SBC_ERR_OK; 46 46 struct smbconf_ctx *ctx; 47 47 48 48 if (conf_ctx == NULL) { 49 return WERR_INVALID_PARAM;49 return SBC_ERR_INVALID_PARAM; 50 50 } 51 51 52 52 ctx = talloc_zero(mem_ctx, struct smbconf_ctx); 53 53 if (ctx == NULL) { 54 return WERR_NOMEM;54 return SBC_ERR_NOMEM; 55 55 } 56 56 57 57 ctx->ops = ops; 58 58 59 werr = ctx->ops->init(ctx, path);60 if (! W_ERROR_IS_OK(werr)) {59 err = ctx->ops->init(ctx, path); 60 if (!SBC_ERROR_IS_OK(err)) { 61 61 goto fail; 62 62 } … … 65 65 66 66 *conf_ctx = ctx; 67 return werr;67 return err; 68 68 69 69 fail: 70 70 talloc_free(ctx); 71 return werr;71 return err; 72 72 } 73 73 … … 76 76 * add a string to a talloced array of strings. 77 77 */ 78 WERRORsmbconf_add_string_to_array(TALLOC_CTX *mem_ctx,78 sbcErr smbconf_add_string_to_array(TALLOC_CTX *mem_ctx, 79 79 char ***array, 80 80 uint32_t count, … … 84 84 85 85 if (array == NULL) { 86 return WERR_INVALID_PARAM;86 return SBC_ERR_INVALID_PARAM; 87 87 } 88 88 89 89 new_array = talloc_realloc(mem_ctx, *array, char *, count + 1); 90 90 if (new_array == NULL) { 91 return WERR_NOMEM;91 return SBC_ERR_NOMEM; 92 92 } 93 93 … … 98 98 if (new_array[count] == NULL) { 99 99 talloc_free(new_array); 100 return WERR_NOMEM;100 return SBC_ERR_NOMEM; 101 101 } 102 102 } … … 104 104 *array = new_array; 105 105 106 return WERR_OK;106 return SBC_ERR_OK; 107 107 } 108 108
Note:
See TracChangeset
for help on using the changeset viewer.