summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2016-02-05 16:37:58 -0500
committerJarkko Hietaniemi <jhi@iki.fi>2016-02-07 08:23:46 -0500
commitf33b12f351ef63991bb640a426dc78b081a602d1 (patch)
treefd1ea618175b9b4c61fe555b50f0243a77435f19 /ext
parentddc7c5c7d33132a836845f632085f65497425023 (diff)
downloadperl-f33b12f351ef63991bb640a426dc78b081a602d1.tar.gz
POSIX: strcmp NE strEQ().
CID 135006: Constant expression result (CONSTANT_EXPRESSION_RESULT) The Coverity 'detail' is priceless: always_true_or: The "or" condition strcmp(strings->name, "decimal_point") || strcmp(strings->name, "thousands_sep") || strcmp(strings->name, "grouping") will always be true because strings->name cannot be equal to two different values at the same time, so it must be not equal to at least one of them.
Diffstat (limited to 'ext')
-rw-r--r--ext/POSIX/POSIX.xs6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/POSIX/POSIX.xs b/ext/POSIX/POSIX.xs
index 570658f11f..12da49fb0a 100644
--- a/ext/POSIX/POSIX.xs
+++ b/ext/POSIX/POSIX.xs
@@ -1558,13 +1558,13 @@ static const struct lconv_offset lconv_strings[] = {
/* The Linux man pages say these are the field names for the structure
* components that are LC_NUMERIC; the rest being LC_MONETARY */
-# define isLC_NUMERIC_STRING(name) (strcmp(name, "decimal_point") \
- || strcmp(name, "thousands_sep") \
+# define isLC_NUMERIC_STRING(name) (strEQ(name, "decimal_point") \
+ || strEQ(name, "thousands_sep") \
\
/* There should be no harm done \
* checking for this, even if \
* NO_LOCALECONV_GROUPING */ \
- || strcmp(name, "grouping"))
+ || strEQ(name, "grouping"))
#else
# define isLC_NUMERIC_STRING(name) (0)
#endif