diff options
author | Dmitry Chestnykh <dm.chestnykh@gmail.com> | 2024-02-21 21:05:00 +0300 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2024-02-25 11:29:44 +0100 |
commit | 086a5f165096af104b01bb6d5639bd769bd17620 (patch) | |
tree | e2a9c96a566245835299d57f3eebea4604d4dbfb /libpthread/nptl | |
parent | 242023ce7d219369503fc033e862bad6a6e4c52a (diff) |
Remove unneeded comparisons.
Inside `if` branches the conditions
`as->ino == bs->ino` and `as->dev == bs->dev`
are always false.
Signed-off-by: Dmitry Chestnykh <dm.chestnykh@gmail.com>
Diffstat (limited to 'libpthread/nptl')
-rw-r--r-- | libpthread/nptl/sem_open.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libpthread/nptl/sem_open.c b/libpthread/nptl/sem_open.c index 2746da1b7..8c99d6dbe 100644 --- a/libpthread/nptl/sem_open.c +++ b/libpthread/nptl/sem_open.c @@ -147,11 +147,11 @@ __sem_search (const void *a, const void *b) if (as->ino != bs->ino) /* Cannot return the difference the type is larger than int. */ - return as->ino < bs->ino ? -1 : (as->ino == bs->ino ? 0 : 1); + return as->ino < bs->ino ? -1 : 1; if (as->dev != bs->dev) /* Cannot return the difference the type is larger than int. */ - return as->dev < bs->dev ? -1 : (as->dev == bs->dev ? 0 : 1); + return as->dev < bs->dev ? -1 : 1; return strcmp (as->name, bs->name); } |