1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

ping pong: fix logic for mmap reads vs. preads

Michael

(This used to be ctdb commit 0c88fa41bc3c629052bc137ed30c473ed10522fd)
This commit is contained in:
Michael Adam 2009-05-12 07:56:23 +02:00 committed by Ronnie Sahlberg
parent 179d911826
commit 60bfafbf10

View File

@ -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];