diff options
author | Chip Salzenberg <chip@atlantic.net> | 1996-12-15 17:38:45 +1200 |
---|---|---|
committer | Chip Salzenberg <chip@atlantic.net> | 1996-12-19 16:44:00 +1200 |
commit | 159bba365a4935ff8f978d49b5bf733329e27959 (patch) | |
tree | 902510fcb68bc51c8871039f9647af52215e490f /perlio.c | |
parent | 43fcc5d2e6d10f3d06dbf2aa8a09d23e17c8106c (diff) | |
download | perl-159bba365a4935ff8f978d49b5bf733329e27959.tar.gz |
Eliminate PerlIO warnings when setting cnt to -1
Diffstat (limited to 'perlio.c')
-rw-r--r-- | perlio.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -145,7 +145,7 @@ PerlIO_set_cnt(f,cnt) PerlIO *f; int cnt; { - if (cnt < 0) + if (cnt < -1) warn("Setting cnt to %d\n",cnt); #if defined(USE_STDIO_PTR) && defined(STDIO_CNT_LVALUE) FILE_cnt(f) = cnt; @@ -164,8 +164,8 @@ int cnt; #ifdef FILE_bufsiz char *e = (char *)(FILE_base(f) + FILE_bufsiz(f)); int ec = e - ptr; - if (ptr > e) - warn("Setting ptr %p > base %p\n",ptr, FILE_base(f)+FILE_bufsiz(f)); + if (ptr > e + 1) + warn("Setting ptr %p > end+1 %p\n", ptr, e + 1); if (cnt != ec) warn("Setting cnt to %d, ptr implies %d\n",cnt,ec); #endif |