summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2015-09-23 22:19:38 +0200
committerAnatol Belski <ab@php.net>2015-09-24 16:33:54 +0200
commit807c29ed141bc6d7d9790e86c00186e01300d006 (patch)
treee1207844af55c6b663a09740cfe921d1a6669aff
parent29bf529d88c8c7043107eb42424e7eb6728d516d (diff)
downloadphp-git-807c29ed141bc6d7d9790e86c00186e01300d006.tar.gz
fix warning
-rw-r--r--ext/standard/file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/standard/file.c b/ext/standard/file.c
index 96509040b3..1c5aed7eb2 100644
--- a/ext/standard/file.c
+++ b/ext/standard/file.c
@@ -1044,7 +1044,7 @@ PHPAPI PHP_FUNCTION(fgets)
}
/* resize buffer if it's much larger than the result.
* Only needed if the user requested a buffer size. */
- if (line_len < len / 2) {
+ if (line_len < (size_t)len / 2) {
str = zend_string_truncate(str, line_len, 0);
} else {
ZSTR_LEN(str) = line_len;