fixed logic bug
authorAndrew Tridgell <tridge@samba.org>
Thu, 8 Oct 2009 04:55:30 +0000 (15:55 +1100)
committerAndrew Tridgell <tridge@samba.org>
Thu, 8 Oct 2009 04:55:30 +0000 (15:55 +1100)
ping_pong.c

index 8511d95..cfcea44 100644 (file)
@@ -94,7 +94,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];