Fixed warnings.

Minor style changes.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6297 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2004-01-25 15:25:50 +00:00
parent b103e03a71
commit 8d0b31a063
@@ -95,7 +95,7 @@ waitForMessage(port_id port,const char *string,int32 op,char *name)
if (message.what != B_QUERY_UPDATE if (message.what != B_QUERY_UPDATE
|| message.FindInt32("opcode") != op) { || message.FindInt32("opcode") != op) {
printf("Expected what = %lx, opcode = %ld, got:",B_QUERY_UPDATE,op); printf("Expected what = %x, opcode = %ld, got:", B_QUERY_UPDATE, op);
message.PrintToStream(); message.PrintToStream();
putchar('\n'); putchar('\n');
return message.FindInt32("opcode"); return message.FindInt32("opcode");
@@ -110,7 +110,7 @@ main(int argc,char **argv)
{ {
port_id port = create_port(100, "query port"); port_id port = create_port(100, "query port");
printf("port id = %ld\n", port); printf("port id = %ld\n", port);
printf(" B_ENTRY_REMOVED = %ld, B_ENTRY_CREATED = %ld\n\n",B_ENTRY_REMOVED,B_ENTRY_CREATED); printf(" B_ENTRY_REMOVED = %d, B_ENTRY_CREATED = %d\n\n", B_ENTRY_REMOVED, B_ENTRY_CREATED);
dev_t device = dev_for_path("."); dev_t device = dev_for_path(".");
DIR *query = fs_open_live_query(device, "name=_query_test_*", B_LIVE_QUERY, port, 12345); DIR *query = fs_open_live_query(device, "name=_query_test_*", B_LIVE_QUERY, port, 12345);
@@ -134,12 +134,16 @@ main(int argc,char **argv)
waitForMessage(port,"File 2 renamed again (should time out):", B_TIMED_OUT, NULL); waitForMessage(port,"File 2 renamed again (should time out):", B_TIMED_OUT, NULL);
entry->Rename("_query_test_2"); entry->Rename("_query_test_2");
waitForMessage(port,"File 2 renamed back (should be added to query):",B_ENTRY_CREATED,"_query_test_2"); waitForMessage(port,"File 2 renamed back (should be added to query):",
B_ENTRY_CREATED, "_query_test_2");
entry->Rename("_query_test_2_and_more"); entry->Rename("_query_test_2_and_more");
status_t status = waitForMessage(port,"File 2 renamed (should stay in query, time out):",B_TIMED_OUT,"_query_test_2_and_more"); status_t status = waitForMessage(port,"File 2 renamed (should stay in query, time out):",
if (status == B_ENTRY_REMOVED) B_TIMED_OUT, "_query_test_2_and_more");
waitForMessage(port,"Received B_ENTRY_REMOVED, now expecting file 2 to be added again:",B_ENTRY_CREATED,NULL); if (status == B_ENTRY_REMOVED) {
waitForMessage(port,"Received B_ENTRY_REMOVED, now expecting file 2 to be added again:",
B_ENTRY_CREATED, NULL);
}
entry->Remove(); entry->Remove();
delete entry; delete entry;