Fix typos reported by Mika, and remove whitespaces

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26202 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Oliver Ruiz Dorantes
2008-07-01 20:28:12 +00:00
parent d0651ae6ac
commit b42c202a65
+26 -26
View File
@@ -84,40 +84,40 @@ LocalDeviceHandler::ClearWantedEvent(BMessage* msg, uint16 event, uint16 opcode)
int32 eventIndex = 0; int32 eventIndex = 0;
// for each Event // for each Event
while (msg->FindInt16("eventExpected", eventIndex, &eventFound) == B_OK ) { while (msg->FindInt16("eventExpected", eventIndex, &eventFound) == B_OK ) {
printf("@ Event expected found @%ld\n", eventIndex); printf("@ Event expected found @%ld\n", eventIndex);
if (eventFound == event) { if (eventFound == event) {
printf("@ Event matches %ld\n", eventIndex); printf("@ Event matches %ld\n", eventIndex);
// there is an opcode specified // there is an opcode specified
if (opcode != 0) { if (opcode != 0) {
// The opcode matches // The opcode matches
if ( (msg->FindInt16("opcodeExpected", eventIndex, &opcodeFound) == B_OK) && if ( (msg->FindInt16("opcodeExpected", eventIndex, &opcodeFound) == B_OK) &&
((uint16)opcodeFound == opcode) ) { ((uint16)opcodeFound == opcode) ) {
// this should remove only the entry // this should remove only the entry
printf("@ Removed event %d and opcoce %d from message %p\n", event, opcode, msg); printf("@ Removed event %d and opcode %d from message %p\n", event, opcode, msg);
(void)msg->RemoveData("eventExpected", eventIndex); (void)msg->RemoveData("eventExpected", eventIndex);
(void)msg->RemoveData("opcodeExpected", eventIndex); (void)msg->RemoveData("opcodeExpected", eventIndex);
goto bail; goto bail;
} }
} else { } else {
// Event matches so far // Event matches so far
printf("@ Removed event %d from message %p\n", event, msg); printf("@ Removed event %d from message %p\n", event, msg);
(void)msg->RemoveData("eventExpected", eventIndex); (void)msg->RemoveData("eventExpected", eventIndex);
goto bail; goto bail;
} }
} }
eventIndex++; eventIndex++;
} }
bail: bail:
fEventsWanted.Unlock(); fEventsWanted.Unlock();
} }
@@ -151,7 +151,7 @@ LocalDeviceHandler::FindPetition(uint16 event, uint16 opcode, int32* indexFound)
printf("opcode does not match %d\n", opcode); printf("opcode does not match %d\n", opcode);
break; break;
} }
printf("Opcdodes match %d %d \n", opcode , opcodeFound); printf("Opcodes match %d %d \n", opcode , opcodeFound);
} }
fEventsWanted.Unlock(); fEventsWanted.Unlock();