X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=ccan%2Frbuf%2Ftest%2Frun-term-eof.c;h=0c346d7eac94ee83f9fd3614d501a4baec33843a;hb=f7ead5da96bfb5ce3ebffe11256bbcb5f4b4f750;hp=25b060f73a60cdb4fc176bd24d6a911b049972dc;hpb=d8a270fdfc57ffe7603028ecda99eeab3889ca70;p=ccan diff --git a/ccan/rbuf/test/run-term-eof.c b/ccan/rbuf/test/run-term-eof.c index 25b060f7..0c346d7e 100644 --- a/ccan/rbuf/test/run-term-eof.c +++ b/ccan/rbuf/test/run-term-eof.c @@ -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(); }