]> git.cameronkatri.com Git - cgit.git/commitdiff
ui-repolist: do not return unsigned (negative) value
authorChristian Hesse <mail@eworm.de>
Fri, 22 Nov 2019 10:09:50 +0000 (11:09 +0100)
committerChristian Hesse <mail@eworm.de>
Fri, 22 Nov 2019 12:35:50 +0000 (13:35 +0100)
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>
ui-repolist.c

index 7cf763891fcc069262476ac9bca153495f907efc..529a2038baa21617d52d742894b3a06120378dd7 100644 (file)
@@ -20,7 +20,7 @@ static time_t read_agefile(const char *path)
 
        if (readfile(path, &buf, &size)) {
                free(buf);
-               return -1;
+               return 0;
        }
 
        if (parse_date(buf, &date_buf) == 0)