]> git.ozlabs.org Git - ccan/blobdiff - ccan/failtest/test/run-open.c
failtest, rbuf: fix up incorrect lseek arg order.
[ccan] / ccan / failtest / test / run-open.c
index b2a5aab145b5ac814b1ed962ee763c61a478954f..8b31ff71f35e73349e7ac1e9a060ef7014721c53 100644 (file)
@@ -1,11 +1,11 @@
+/* Include the C files directly. */
+#include <ccan/failtest/failtest.c>
 #include <stdlib.h>
 #include <setjmp.h>
 #include <stdio.h>
 #include <stdarg.h>
 #include <assert.h>
 #include <ccan/tap/tap.h>
-/* Include the C files directly. */
-#include <ccan/failtest/failtest.c>
 
 int main(void)
 {
@@ -29,7 +29,7 @@ int main(void)
        }
        /* Check it is read-write. */
        ok1(write(fd, buf, strlen(buf)) == strlen(buf));
-       lseek(fd, SEEK_SET, 0);
+       lseek(fd, 0, SEEK_SET);
        ok1(read(fd, buf, strlen("Hello world!")) == strlen("Hello world!"));
        ok1(strcmp(buf, "Hello world!") == 0);