From 8d515c516c019ff51a782923c0a13ba240fda197 Mon Sep 17 00:00:00 2001 From: Thomas Schmucker Date: Sat, 31 Oct 2020 19:05:36 +0100 Subject: pragmatisches C... --- arraylist.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'arraylist.c') diff --git a/arraylist.c b/arraylist.c index 668278e..2d348f3 100644 --- a/arraylist.c +++ b/arraylist.c @@ -278,15 +278,12 @@ my_compare(const T *a, const T *b, void *args) { (void) args; - if ( *a > *b ) { + if ( *a > *b ) return 1; - } - else if ( *a < *b ) { + else if ( *a < *b ) return -1; - } - else { + else return 0; - } } static int -- cgit v1.3