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