]> git.ozlabs.org Git - ccan/blobdiff - ccan/rbuf/test/run-term-eof.c
failtest, rbuf: fix up incorrect lseek arg order.
[ccan] / ccan / rbuf / test / run-term-eof.c
index 25b060f73a60cdb4fc176bd24d6a911b049972dc..0c346d7eac94ee83f9fd3614d501a4baec33843a 100644 (file)
@@ -27,7 +27,7 @@ int main(void)
        /* Grab ourselves for comparison. */
        len = read(fd, buf, sizeof(buf));
        buf[len] = '\0';
-       lseek(fd, SEEK_SET, 0);
+       lseek(fd, 0, SEEK_SET);
 
        /* We have exact-size buffer, which causes problems adding term. */
        rbuf_init(&in, fd, malloc(len), len, test_realloc);
@@ -44,7 +44,7 @@ int main(void)
        free(rbuf_cleanup(&in));
 
        /* Try again. */
-       lseek(fd, SEEK_SET, 0);
+       lseek(fd, 0, SEEK_SET);
        rbuf_init(&in, fd, malloc(len), len, test_realloc);
        p = rbuf_read_str(&in, 64);
        ok1(p);
@@ -53,12 +53,12 @@ int main(void)
        free(rbuf_cleanup(&in));
 
        /* Normal case, we get rbuf_start after nul */
-       lseek(fd, SEEK_SET, 0);
+       lseek(fd, 0, SEEK_SET);
        rbuf_init(&in, fd, NULL, 0, test_realloc);
        p = rbuf_read_str(&in, '^');
        ok1(p);
        ok1(rbuf_start(&in) == p + strlen(p) + 1);
        free(rbuf_cleanup(&in));
-       
+
        return exit_status();
 }