diff options
author | Philip Guenther <guenther@cvs.openbsd.org> | 2013-08-20 01:13:55 +0000 |
---|---|---|
committer | Philip Guenther <guenther@cvs.openbsd.org> | 2013-08-20 01:13:55 +0000 |
commit | ec5d5c67f621a90ddde6b284da23f520a59141da (patch) | |
tree | 9dc733709f3a29187947e431f439ff501e7a3f51 /regress/lib | |
parent | 1108459c07866ed5cc31c875e29fafbfff4ac9e4 (diff) |
Include more details in failure messages
Diffstat (limited to 'regress/lib')
-rw-r--r-- | regress/lib/libc/telldir/telldir.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/regress/lib/libc/telldir/telldir.c b/regress/lib/libc/telldir/telldir.c index fc1ca3e8913..9de0eb5e969 100644 --- a/regress/lib/libc/telldir/telldir.c +++ b/regress/lib/libc/telldir/telldir.c @@ -1,4 +1,4 @@ -/* $OpenBSD: telldir.c,v 1.2 2006/04/01 18:24:53 otto Exp $ */ +/* $OpenBSD: telldir.c,v 1.3 2013/08/20 01:13:54 guenther Exp $ */ /* Written by Otto Moerbeek, 2006, Public domain. */ @@ -58,7 +58,7 @@ loop(DIR *dp, int i) { struct dirent *f; char file[PATH_MAX]; - long pos, remember = -1; + long pos, t, remember = -1; rewinddir(dp); snprintf(file, sizeof file, "%d", i); @@ -71,12 +71,12 @@ loop(DIR *dp, int i) remember = pos; } if (remember == -1) - errx(1, "remember"); + errx(1, "remember %s", file); seekdir(dp, remember); - if (telldir(dp) != remember) - errx(1, "tell after seek"); - if (telldir(dp) != remember) - errx(1, "tell after tell"); + if ((t = telldir(dp)) != remember) + errx(1, "tell after seek %s %ld != %ld", file, t, pos); + if ((t = telldir(dp)) != remember) + errx(1, "tell after tell %s %ld != %ld", file, t, pos); f = readdir(dp); if (f == NULL) err(1, "seek to %s %ld", file, remember); |