summaryrefslogtreecommitdiffstats
path: root/source/torture/msgtest.c
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2006-07-31 21:11:03 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:38:27 -0500
commit641dac4f85c0e00484d90726bea1a4cb58c8235c (patch)
tree142ed6af14eaea51b5830caf2ec401fc4565ebf6 /source/torture/msgtest.c
parentfcd798ca0c1b76adb2bcda4a99c40c7aacb0addb (diff)
downloadsamba-641dac4f85c0e00484d90726bea1a4cb58c8235c.tar.gz
samba-641dac4f85c0e00484d90726bea1a4cb58c8235c.tar.xz
samba-641dac4f85c0e00484d90726bea1a4cb58c8235c.zip
r17347: Some C++ warnings -- 271 left
Diffstat (limited to 'source/torture/msgtest.c')
-rw-r--r--source/torture/msgtest.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/source/torture/msgtest.c b/source/torture/msgtest.c
index 557f4edf887..0c7b57f80c6 100644
--- a/source/torture/msgtest.c
+++ b/source/torture/msgtest.c
@@ -66,7 +66,8 @@ void pong_message(int msg_type, struct process_id src, void *buf, size_t len)
message_init();
if (argc != 3) {
- fprintf(stderr, "%s: Usage - %s pid count\n", argv[0], argv[0]);
+ fprintf(stderr, "%s: Usage - %s pid count\n", argv[0],
+ argv[0]);
exit(1);
}
@@ -115,11 +116,11 @@ void pong_message(int msg_type, struct process_id src, void *buf, size_t len)
size_t ping_count = 0;
printf("Sending pings for %d seconds\n", (int)timelimit);
- while (timeval_elapsed(&tv) < timelimit) {
+ while (timeval_elapsed(&tv) < timelimit) {
if(message_send_pid(pid_to_procid(pid), MSG_PING,
- buf, 11, False)) ping_count++;
+ buf, 11, False)) ping_count++;
if(message_send_pid(pid_to_procid(pid), MSG_PING,
- NULL, 0, False)) ping_count++;
+ NULL, 0, False)) ping_count++;
while (ping_count > pong_count + 20) {
message_dispatch();
@@ -138,7 +139,7 @@ void pong_message(int msg_type, struct process_id src, void *buf, size_t len)
}
printf("ping rate of %.0f messages/sec\n",
- (ping_count+pong_count)/timeval_elapsed(&tv));
+ (ping_count+pong_count)/timeval_elapsed(&tv));
}
return (0);