diff options
| author | 2014-03-02 17:00:16 (JST) | |
|---|---|---|
| committer | 2014-03-02 17:00:16 (JST) | |
| commit | 667bf9f6ed38daac4e4d7e88903eb0f28319c165 (patch) | |
| tree | d7d36d505fb3c183bdec673c6e294b27e1a12310 /ui-refs.c | |
| parent | 1f57ee005551ae7ee2b387f14eb7dd104a120ee3 (diff) | |
| parent | f2fa9c56e29ae32bbe5841e7bfe0217ada4e3df9 (diff) | |
| download | cgit-667bf9f6ed38daac4e4d7e88903eb0f28319c165.zip cgit-667bf9f6ed38daac4e4d7e88903eb0f28319c165.tar.gz | |
Merge tag 'v0.10.1'
CGIT 0.10.1
Diffstat (limited to 'ui-refs.c')
| -rw-r--r-- | ui-refs.c | 16 | 
1 files changed, 4 insertions, 12 deletions
| @@ -11,18 +11,10 @@ | |||
| 11 | #include "html.h" | 11 | #include "html.h" | 
| 12 | #include "ui-shared.h" | 12 | #include "ui-shared.h" | 
| 13 | 13 | ||
| 14 | static int cmp_age(int age1, int age2) | 14 | static inline int cmp_age(int age1, int age2) | 
| 15 | { | 15 | { | 
| 16 | if (age1 != 0 && age2 != 0) | 16 | /* age1 and age2 are assumed to be non-negative */ | 
| 17 | return age2 - age1; | 17 | return age2 - age1; | 
| 18 | |||
| 19 | if (age1 == 0 && age2 == 0) | ||
| 20 | return 0; | ||
| 21 | |||
| 22 | if (age1 == 0) | ||
| 23 | return +1; | ||
| 24 | |||
| 25 | return -1; | ||
| 26 | } | 18 | } | 
| 27 | 19 | ||
| 28 | static int cmp_ref_name(const void *a, const void *b) | 20 | static int cmp_ref_name(const void *a, const void *b) | 
| @@ -105,7 +97,7 @@ static void print_tag_downloads(const struct cgit_repo *repo, const char *ref) | |||
| 105 | const char *basename; | 97 | const char *basename; | 
| 106 | int free_ref = 0; | 98 | int free_ref = 0; | 
| 107 | 99 | ||
| 108 | if (!ref || strlen(ref) < 2) | 100 | if (!ref || strlen(ref) < 1) | 
| 109 | return; | 101 | return; | 
| 110 | 102 | ||
| 111 | basename = cgit_repobasename(repo->url); | 103 | basename = cgit_repobasename(repo->url); | 
