diff options
| author | Thomas Schmucker <ts@its1.de> | 2020-10-31 19:05:36 +0100 |
|---|---|---|
| committer | Thomas Schmucker <ts@its1.de> | 2020-10-31 19:05:36 +0100 |
| commit | 8d515c516c019ff51a782923c0a13ba240fda197 (patch) | |
| tree | fbf3505bc8df35ce774ed7a6af14b13877e093ce | |
| parent | f3b075e842cfbccfe668853266c83766bec0e3a3 (diff) | |
| download | data-structures-8d515c516c019ff51a782923c0a13ba240fda197.tar.gz data-structures-8d515c516c019ff51a782923c0a13ba240fda197.tar.bz2 data-structures-8d515c516c019ff51a782923c0a13ba240fda197.zip | |
pragmatisches C...
| -rw-r--r-- | arraylist.c | 9 |
1 files changed, 3 insertions, 6 deletions
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) | |||
| 278 | { | 278 | { |
| 279 | (void) args; | 279 | (void) args; |
| 280 | 280 | ||
| 281 | if ( *a > *b ) { | 281 | if ( *a > *b ) |
| 282 | return 1; | 282 | return 1; |
| 283 | } | 283 | else if ( *a < *b ) |
| 284 | else if ( *a < *b ) { | ||
| 285 | return -1; | 284 | return -1; |
| 286 | } | 285 | else |
| 287 | else { | ||
| 288 | return 0; | 286 | return 0; |
| 289 | } | ||
| 290 | } | 287 | } |
| 291 | 288 | ||
| 292 | static int | 289 | static int |
