diff options
author | Harald Radi <phanto@php.net> | 2002-03-20 19:13:03 +0000 |
---|---|---|
committer | Harald Radi <phanto@php.net> | 2002-03-20 19:13:03 +0000 |
commit | f64628eb7d698a93a4e8b93d52f8abf4fa3b6980 (patch) | |
tree | eb28acc5e46c6a1b36339902dbab82108e5672f2 /main/memory_streams.c | |
parent | 85682d568f5212c3cf4d0c387d8aa92418d23089 (diff) | |
download | php-git-f64628eb7d698a93a4e8b93d52f8abf4fa3b6980.tar.gz |
fixed signed/unsigned comparison warnings
Diffstat (limited to 'main/memory_streams.c')
-rw-r--r-- | main/memory_streams.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/main/memory_streams.c b/main/memory_streams.c index 702e96f396..92540a29df 100644 --- a/main/memory_streams.c +++ b/main/memory_streams.c @@ -153,14 +153,14 @@ static int php_stream_memory_seek(php_stream *stream, off_t offset, int whence T switch(whence) { case SEEK_CUR: if (offset < 0) { - if (ms->fpos < -offset) { + if (ms->fpos < (size_t)(-offset)) { ms->fpos = 0; /*return EINVAL;*/ } else { ms->fpos = ms->fpos + offset; } } else { - if (ms->fpos < offset) { + if (ms->fpos < (size_t)(offset)) { ms->fpos = ms->fsize; /*return EINVAL;*/ } else { @@ -169,7 +169,7 @@ static int php_stream_memory_seek(php_stream *stream, off_t offset, int whence T } return 0; case SEEK_SET: - if (offset > ms->fsize) { + if (ms->fsize < (size_t)(offset)) { ms->fpos = ms->fsize; /*return EINVAL;*/ } else { @@ -180,7 +180,7 @@ static int php_stream_memory_seek(php_stream *stream, off_t offset, int whence T if (offset > 0) { ms->fpos = ms->fsize; /*return EINVAL;*/ - } else if (ms->fpos < -offset) { + } else if (ms->fpos < (size_t)(-offset)) { ms->fpos = 0; /*return EINVAL;*/ } else { |