This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[ID 20001112.008] perlio.c's PerlIO_getpos ingores error return
authorNicholas Clark <nick@ccl4.org>
Sun, 12 Nov 2000 21:14:11 +0000 (21:14 +0000)
committerJarkko Hietaniemi <jhi@iki.fi>
Mon, 13 Nov 2000 04:17:34 +0000 (04:17 +0000)
Message-Id: <E13v4S3-0000iY-00@Bagpuss.unfortu.net>

Note: only one breakage of the two reported is fixed by this patch.

p4raw-id: //depot/perl@7666

perlio.c

index a0e6bc0..fa69c44 100644 (file)
--- a/perlio.c
+++ b/perlio.c
@@ -2314,7 +2314,7 @@ int
 PerlIO_getpos(PerlIO *f, Fpos_t *pos)
 {
  *pos = PerlIO_tell(f);
- return 0;
+ return *pos != -1;
 }
 #else
 #ifndef PERLIO_IS_STDIO