com php-src: fix warning: ext/standard/file.c
| From: | Anatol Belski | Date: | Thu, 24 Sep 2015 14:33:54 +0000 |
| Subject: | com php-src: fix warning: ext/standard/file.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-89159@lists.php.net to get a copy of this message | ||
Commit: 807c29ed141bc6d7d9790e86c00186e01300d006
Author: Anatol Belski <ab@php.net> Wed, 23 Sep 2015 22:19:38 +0200
Parents: 29bf529d88c8c7043107eb42424e7eb6728d516d
Branches: PHP-7.0 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=807c29ed141bc6d7d9790e86c00186e01300d006
Log:
fix warning
Changed paths:
M ext/standard/file.c
Diff:
diff --git a/ext/standard/file.c b/ext/standard/file.c
index 9650904..1c5aed7 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;