diff options
author | Andrew Bartlett <abartlet@samba.org> | 2011-06-24 16:26:23 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2011-06-24 16:26:23 +1000 |
commit | 6da26870e0ae5acd6ff49a30ec2f6886b44d095e (patch) | |
tree | 850c71039563c16a5d563c47e7ba2ab645baf198 /source3/modules/vfs_xattr_tdb.c | |
parent | 6925a799d04c6fa59dd2ddef1f5510f9bb7d17d1 (diff) | |
parent | 2610c05b5b95cc7036b3d6dfb894c6cfbdb68483 (diff) | |
download | samba-6da26870e0ae5acd6ff49a30ec2f6886b44d095e.tar.gz samba-6da26870e0ae5acd6ff49a30ec2f6886b44d095e.tar.bz2 samba-6da26870e0ae5acd6ff49a30ec2f6886b44d095e.zip |
Merge 2610c05b5b95cc7036b3d6dfb894c6cfbdb68483 as Samba-4.0alpha16
Diffstat (limited to 'source3/modules/vfs_xattr_tdb.c')
-rw-r--r-- | source3/modules/vfs_xattr_tdb.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/source3/modules/vfs_xattr_tdb.c b/source3/modules/vfs_xattr_tdb.c index 5b62565d62..40ccf06dd9 100644 --- a/source3/modules/vfs_xattr_tdb.c +++ b/source3/modules/vfs_xattr_tdb.c @@ -24,6 +24,7 @@ #include "librpc/gen_ndr/ndr_xattr.h" #include "../librpc/gen_ndr/ndr_netlogon.h" #include "dbwrap.h" +#include "util_tdb.h" #undef DBGC_CLASS #define DBGC_CLASS DBGC_VFS @@ -40,7 +41,7 @@ static NTSTATUS xattr_tdb_pull_attrs(TALLOC_CTX *mem_ctx, enum ndr_err_code ndr_err; struct tdb_xattrs *result; - if (!(result = TALLOC_ZERO_P(mem_ctx, struct tdb_xattrs))) { + if (!(result = talloc_zero(mem_ctx, struct tdb_xattrs))) { return NT_STATUS_NO_MEMORY; } @@ -107,7 +108,7 @@ static NTSTATUS xattr_tdb_load_attrs(TALLOC_CTX *mem_ctx, if (db_ctx->fetch(db_ctx, mem_ctx, make_tdb_data(id_buf, sizeof(id_buf)), - &data) == -1) { + &data) != 0) { return NT_STATUS_INTERNAL_DB_CORRUPTION; } @@ -298,12 +299,12 @@ static int xattr_tdb_setattr(struct db_context *db_ctx, return -1; } - tmp = TALLOC_REALLOC_ARRAY( + tmp = talloc_realloc( attribs, attribs->eas, struct xattr_EA, attribs->num_eas+ 1); if (tmp == NULL) { - DEBUG(0, ("TALLOC_REALLOC_ARRAY failed\n")); + DEBUG(0, ("talloc_realloc failed\n")); TALLOC_FREE(rec); errno = ENOMEM; return -1; @@ -314,7 +315,7 @@ static int xattr_tdb_setattr(struct db_context *db_ctx, } attribs->eas[i].name = name; - attribs->eas[i].value.data = CONST_DISCARD(uint8 *, value); + attribs->eas[i].value.data = discard_const_p(uint8, value); attribs->eas[i].value.length = size; status = xattr_tdb_save_attrs(rec, attribs); |