diff options
-rw-r--r-- | regress/lib/libc/open_memstream/open_memstreamtest.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/regress/lib/libc/open_memstream/open_memstreamtest.c b/regress/lib/libc/open_memstream/open_memstreamtest.c index 5366a82ae98..e8da0e03b21 100644 --- a/regress/lib/libc/open_memstream/open_memstreamtest.c +++ b/regress/lib/libc/open_memstream/open_memstreamtest.c @@ -1,4 +1,4 @@ -/* $OpenBSD: open_memstreamtest.c,v 1.5 2019/05/02 08:38:41 yasuoka Exp $ */ +/* $OpenBSD: open_memstreamtest.c,v 1.6 2019/05/13 02:54:54 bluhm Exp $ */ /* * Copyright (c) 2011 Martin Pieuchot <mpi@openbsd.org> @@ -138,33 +138,33 @@ main(void) failures++; } - if (fseek(fp, 8, SEEK_SET) != 0) { + if (fseek(fp, -1, SEEK_END) != 0) { warnx("failed to fseek. (19)"); failures++; } + if (fseek(fp, 8, SEEK_SET) != 0) { + warnx("failed to fseek. (20)"); + failures++; + } + if (ftell(fp) != 8) { - warnx("failed seek test. (20)"); + warnx("failed seek test. (21)"); failures++; } /* Try to seek backward */ if (fseek(fp, -1, SEEK_CUR) != 0) { - warnx("failed to fseek. (21)"); + warnx("failed to fseek. (22)"); failures++; } if (ftell(fp) != 7) { - warnx("failed seeking backward. (22)"); + warnx("failed seeking backward. (23)"); failures++; } if (fseek(fp, 5, SEEK_CUR) != 0) { - warnx("failed to fseek. (23)"); - failures++; - } - - if (fseek(fp, -1, SEEK_END) != 0) { warnx("failed to fseek. (24)"); failures++; } |