diff options
author | Christian Hesse | 2019-11-22 11:09:50 +0100 |
---|---|---|
committer | Christian Hesse | 2019-11-22 13:35:50 +0100 |
commit | 583aa5d80eb01075c0f3f35df37b9144a0c9651e (patch) | |
tree | 3a49bdc085225827796e670294df3823c4073f19 | |
parent | git: update to v2.24.0 (diff) | |
download | cgit-583aa5d80eb01075c0f3f35df37b9144a0c9651e.tar.gz cgit-583aa5d80eb01075c0f3f35df37b9144a0c9651e.zip |
ui-repolist: do not return unsigned (negative) value
The function read_agefile() returns time_t, which is a signed datatime. We should not return unsigned (negative) value here. Reported-by: Johannes Stezenbach <js@linuxtv.org> Signed-off-by: Christian Hesse <mail@eworm.de>
-rw-r--r-- | ui-repolist.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ui-repolist.c b/ui-repolist.c index 7cf7638..529a203 100644 --- a/ui-repolist.c +++ b/ui-repolist.c | |||
@@ -20,7 +20,7 @@ static time_t read_agefile(const char *path) | |||
20 | 20 | ||
21 | if (readfile(path, &buf, &size)) { | 21 | if (readfile(path, &buf, &size)) { |
22 | free(buf); | 22 | free(buf); |
23 | return -1; | 23 | return 0; |
24 | } | 24 | } |
25 | 25 | ||
26 | if (parse_date(buf, &date_buf) == 0) | 26 | if (parse_date(buf, &date_buf) == 0) |