]> gitweb.hhaalo.de Git - discspan.git/commitdiff
optimize cmpfunc
authorBastian Dehn <hhaalo@arcor.de>
Sat, 6 Sep 2025 07:13:47 +0000 (09:13 +0200)
committerBastian Dehn <hhaalo@arcor.de>
Sat, 6 Sep 2025 07:13:47 +0000 (09:13 +0200)
libs/spandisc/src/splitter.c

index 2804fb231a8015e46503ec7349fc27d0a372721e..5232a4e609dd29bcdef333d7d5fe2d3bfada6a2c 100644 (file)
@@ -15,12 +15,11 @@ int cmpfunc(const void *filea, const void *fileb)
 
        if (a < b)
                return 1;
-       else if (a > b)
+
+       if (a > b)
                return -1;
-       else if (a == b)
-               return 0;
-       else
-               return -2;
+
+       return 0;
 }
 
 int strcmpfunc(const void *filea, const void *fileb)