Author: axeld Date: 2010-08-28 16:35:48 +0200 (Sat, 28 Aug 2010) New Revision: 38416 Changeset: http://dev.haiku-os.org/changeset/38416 Modified: haiku/trunk/src/add-ons/kernel/file_systems/cdda/kernel_interface.cpp Log: * Minor cleanup. Modified: haiku/trunk/src/add-ons/kernel/file_systems/cdda/kernel_interface.cpp =================================================================== --- haiku/trunk/src/add-ons/kernel/file_systems/cdda/kernel_interface.cpp 2010-08-28 10:41:57 UTC (rev 38415) +++ haiku/trunk/src/add-ons/kernel/file_systems/cdda/kernel_interface.cpp 2010-08-28 14:35:48 UTC (rev 38416) @@ -1265,18 +1265,19 @@ 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; }