Browse Source

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>
Dmitry Chestnykh 1 year ago
parent
commit
086a5f1650
1 changed files with 2 additions and 2 deletions
  1. 2 2
      libpthread/nptl/sem_open.c

+ 2 - 2
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);
 }