com php-src: simplify the condition: ext/standard/browscap.c
| From: | Anatol Belski | Date: | Mon, 22 Sep 2014 07:41:53 +0000 |
| Subject: | com php-src: simplify the condition: ext/standard/browscap.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-81852@lists.php.net to get a copy of this message | ||
Commit: 0885e4b1b98222c26f8c37a63c06a231f981932d
Author: Anatol Belski <ab@php.net> Sun, 21 Sep 2014 20:54:14 +0200
Parents: 7d4c81d8d9cab8b43bbe06692391e6fee554094f
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=0885e4b1b98222c26f8c37a63c06a231f981932d
Log:
simplify the condition
Changed paths:
M ext/standard/browscap.c
Diff:
diff --git a/ext/standard/browscap.c b/ext/standard/browscap.c
index 9c54aa4..a591a67 100644
--- a/ext/standard/browscap.c
+++ b/ext/standard/browscap.c
@@ -414,7 +414,7 @@ static int browser_reg_compare(zval *browser TSRMLS_DC, int num_args, va_list ar
/* Pick which browser pattern replaces the least amount of
characters when compared to the original user agent string... */
- if (ua_len - prev_len > ua_len - curr_len) {
+ if (prev_len < curr_len) {
ZVAL_COPY_VALUE(found_browser_entry, browser);
}
}