Erratum hrev49359: Compare size with 0 rather that B_OK
Thanks Ingo!
This commit is contained in:
@@ -120,7 +120,7 @@ PrinterSettings::WriteSettings(BMessage* msg)
|
|||||||
status_t err = B_ERROR;
|
status_t err = B_ERROR;
|
||||||
|
|
||||||
length = msg->FlattenedSize();
|
length = msg->FlattenedSize();
|
||||||
if (length < B_OK)
|
if (length < 0)
|
||||||
return length;
|
return length;
|
||||||
data = (char *) malloc(length);
|
data = (char *) malloc(length);
|
||||||
if (data != NULL) {
|
if (data != NULL) {
|
||||||
|
|||||||
@@ -204,7 +204,7 @@ BNetBuffer::AppendMessage(const BMessage& data)
|
|||||||
|
|
||||||
ssize_t dataSize = data.FlattenedSize();
|
ssize_t dataSize = data.FlattenedSize();
|
||||||
|
|
||||||
if (dataSize < B_OK)
|
if (dataSize < 0)
|
||||||
return dataSize;
|
return dataSize;
|
||||||
|
|
||||||
if (dataSize == 0)
|
if (dataSize == 0)
|
||||||
|
|||||||
@@ -429,7 +429,7 @@ TTracker::QuitRequested()
|
|||||||
// if message is empty, delete the corresponding attribute
|
// if message is empty, delete the corresponding attribute
|
||||||
if (message.CountNames(B_ANY_TYPE)) {
|
if (message.CountNames(B_ANY_TYPE)) {
|
||||||
ssize_t size = message.FlattenedSize();
|
ssize_t size = message.FlattenedSize();
|
||||||
if (size > B_OK) {
|
if (size > 0) {
|
||||||
char* buffer = new char[size];
|
char* buffer = new char[size];
|
||||||
message.Flatten(buffer, size);
|
message.Flatten(buffer, size);
|
||||||
deskDir.WriteAttr(kAttrOpenWindows, B_MESSAGE_TYPE, 0, buffer,
|
deskDir.WriteAttr(kAttrOpenWindows, B_MESSAGE_TYPE, 0, buffer,
|
||||||
|
|||||||
Reference in New Issue
Block a user