aboutsummaryrefslogtreecommitdiff
path: root/string
diff options
context:
space:
mode:
Diffstat (limited to 'string')
-rw-r--r--string/strcoll.c10
-rw-r--r--string/strxfrm.c5
2 files changed, 9 insertions, 6 deletions
diff --git a/string/strcoll.c b/string/strcoll.c
index 08ffd63..f44f6c1 100644
--- a/string/strcoll.c
+++ b/string/strcoll.c
@@ -117,8 +117,9 @@ STRCOLL (s1, s2, l)
== (uint32_t) IGNORE_CHAR))
{
++s1ignore;
- if ((forward && ++s1idx >= s1run->data[pass].number)
- || (!forward && --s1idx < 0))
+ if (forward
+ ? ++s1idx >= s1run->data[pass].number
+ : --s1idx < 0)
{
weight_t *nextp = forward ? s1run->next : s1run->prev;
if (nextp == NULL)
@@ -139,8 +140,9 @@ STRCOLL (s1, s2, l)
== (uint32_t) IGNORE_CHAR))
{
++s2ignore;
- if ((forward && ++s2idx >= s2run->data[pass].number)
- || (!forward && --s2idx < 0))
+ if (forward
+ ? ++s2idx >= s2run->data[pass].number
+ : --s2idx < 0)
{
weight_t *nextp = forward ? s2run->next : s2run->prev;
if (nextp == NULL)
diff --git a/string/strxfrm.c b/string/strxfrm.c
index b3e99fb..0bdf106 100644
--- a/string/strxfrm.c
+++ b/string/strxfrm.c
@@ -217,8 +217,9 @@ STRXFRM (STRING_TYPE *dest, const STRING_TYPE *src, size_t n, __locale_t l)
== (u_int32_t) IGNORE_CHAR))
{
++ignore;
- if ((forward && ++idx >= run->data[pass].number)
- || (!forward && --idx < 0))
+ if (forward
+ ? ++idx >= run->data[pass].number
+ : --idx < 0)
{
weight_t *nextp = forward ? run->next : run->prev;
if (nextp == NULL)