Minor strcasecmp optimization.
authorRyan C. Gordon <icculus@icculus.org>
Sun, 30 Mar 2003 20:46:45 +0000
changeset 558 a62e8e26dfc9
parent 557 5001b833b6ff
child 559 6fa9e48b537c
Minor strcasecmp optimization.
platform/posix.c
--- a/platform/posix.c	Sun Mar 30 20:46:25 2003 +0000
+++ b/platform/posix.c	Sun Mar 30 20:46:45 2003 +0000
@@ -131,10 +131,8 @@
     {
         ux = toupper((int) *x);
         uy = toupper((int) *y);
-        if (ux > uy)
-            return(1);
-        else if (ux < uy)
-            return(-1);
+        if (ux != uy)
+            return((ux > uy) ? 1 : -1);
         x++;
         y++;
     } while ((ux) && (uy));