From 84ad848c86f6c36cb7ceab25609710acbc57893b Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Thu, 19 Apr 2012 16:31:52 +1000 Subject: [PATCH] s3-xattr_tdb: Remove dead code: talloc_stackframe() cannot fail Autobuild-User: Andrew Bartlett Autobuild-Date: Thu Apr 19 14:15:42 CEST 2012 on sn-devel-104 --- source3/lib/xattr_tdb.c | 12 ------------ source3/modules/vfs_xattr_tdb.c | 8 -------- 2 files changed, 20 deletions(-) diff --git a/source3/lib/xattr_tdb.c b/source3/lib/xattr_tdb.c index 2bc71df0cf1..be4f3b2a564 100644 --- a/source3/lib/xattr_tdb.c +++ b/source3/lib/xattr_tdb.c @@ -178,10 +178,6 @@ ssize_t xattr_tdb_getattr(struct db_context *db_ctx, ssize_t result = -1; NTSTATUS status; TALLOC_CTX *frame = talloc_stackframe(); - if (!frame) { - errno = ENOMEM; - return -1; - } DEBUG(10, ("xattr_tdb_getattr called for file %s, name %s\n", file_id_string(frame, id), name)); @@ -230,10 +226,6 @@ int xattr_tdb_setattr(struct db_context *db_ctx, uint32_t i; TDB_DATA data; TALLOC_CTX *frame = talloc_stackframe(); - if (!frame) { - errno = ENOMEM; - return -1; - } DEBUG(10, ("xattr_tdb_setattr called for file %s, name %s\n", file_id_string(frame, id), name)); @@ -321,10 +313,6 @@ ssize_t xattr_tdb_listattr(struct db_context *db_ctx, uint32_t i; size_t len = 0; TALLOC_CTX *frame = talloc_stackframe(); - if (!frame) { - errno = ENOMEM; - return -1; - } status = xattr_tdb_load_attrs(frame, db_ctx, id, &attribs); diff --git a/source3/modules/vfs_xattr_tdb.c b/source3/modules/vfs_xattr_tdb.c index 5c105b5194d..ee3199d277b 100644 --- a/source3/modules/vfs_xattr_tdb.c +++ b/source3/modules/vfs_xattr_tdb.c @@ -37,10 +37,6 @@ static ssize_t xattr_tdb_getxattr(struct vfs_handle_struct *handle, ssize_t xattr_size; DATA_BLOB blob; TALLOC_CTX *frame = talloc_stackframe(); - if (!frame) { - errno = ENOMEM; - return -1; - } SMB_VFS_HANDLE_GET_DATA(handle, db, struct db_context, return -1); @@ -75,10 +71,6 @@ static ssize_t xattr_tdb_fgetxattr(struct vfs_handle_struct *handle, ssize_t xattr_size; DATA_BLOB blob; TALLOC_CTX *frame = talloc_stackframe(); - if (!frame) { - errno = ENOMEM; - return -1; - } SMB_VFS_HANDLE_GET_DATA(handle, db, struct db_context, return -1); -- 2.34.1