git.samba.org
/
metze
/
ctdb
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
13270a0
)
ping pong: fix logic for mmap reads vs. preads
author
Michael Adam
<obnox@samba.org>
Tue, 12 May 2009 05:56:23 +0000
(07:56 +0200)
committer
Ronnie Sahlberg
<ronniesahlberg@gmail.com>
Wed, 13 May 2009 06:13:14 +0000
(16:13 +1000)
Michael
utils/ping_pong/ping_pong.c
patch
|
blob
|
history
diff --git
a/utils/ping_pong/ping_pong.c
b/utils/ping_pong/ping_pong.c
index fd0e99b23919d7a6fa50df5074ad812a1084f0dd..90692e59ecc51f2751d34664d96e5e4f60047c92 100644
(file)
--- a/
utils/ping_pong/ping_pong.c
+++ b/
utils/ping_pong/ping_pong.c
@@
-115,7
+115,7
@@
static void ping_pong(int fd, int num_locks)
unsigned char c;
if (use_mmap) {
c = p[i];
- } if (pread(fd, &c, 1, i) != 1) {
+ }
else
if (pread(fd, &c, 1, i) != 1) {
printf("read failed at %d\n", i);
}
incr = c - val[i];