diff options
Diffstat (limited to 'common/sys/sort.c')
-rw-r--r-- | common/sys/sort.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/common/sys/sort.c b/common/sys/sort.c new file mode 100644 index 00000000..edecc0a8 --- /dev/null +++ b/common/sys/sort.c @@ -0,0 +1,10 @@ + +int cmp_int(const void *a, const void *b) +{ + return *(int*)a - *(int*)b; +} + +int cmp_int_desc(const void * a, const void * b) +{ + return cmp_int(b, a); +} |