From be136723e753a621ad855f0c0bb5371cac77d87d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Sat, 28 Aug 2010 14:35:48 +0000 Subject: [PATCH] * Minor cleanup. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38416 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- .../kernel/file_systems/cdda/kernel_interface.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/add-ons/kernel/file_systems/cdda/kernel_interface.cpp b/src/add-ons/kernel/file_systems/cdda/kernel_interface.cpp index aa108f42b4..9487500d06 100644 --- a/src/add-ons/kernel/file_systems/cdda/kernel_interface.cpp +++ b/src/add-ons/kernel/file_systems/cdda/kernel_interface.cpp @@ -1265,18 +1265,19 @@ Inode::AddAttribute(Attribute* attribute, bool overwrite) status_t -Inode::AddAttribute(const char* name, type_code type, - bool overwrite, const uint8* data, size_t length) +Inode::AddAttribute(const char* name, type_code type, bool overwrite, + const uint8* data, size_t length) { Attribute* attribute = new Attribute(name, type); - status_t status = attribute != NULL ? B_OK : B_NO_MEMORY; - if (status == B_OK) - status = attribute->InitCheck(); + if (attribute == NULL) + return B_NO_MEMORY; + + status_t status = attribute->InitCheck(); if (status == B_OK && data != NULL && length != 0) status = attribute->WriteAt(0, data, &length); if (status == B_OK) status = AddAttribute(attribute, overwrite); - if (status < B_OK) { + if (status != B_OK) { delete attribute; return status; }