List for cgit developers and users
 help / color / mirror / Atom feed
* [PATCH 1/1] ui-repolist: do not return unsigned (negative) value
@ 2019-11-22 10:12 list
  2019-11-22 12:30 ` Jason
  0 siblings, 1 reply; 3+ messages in thread
From: list @ 2019-11-22 10:12 UTC (permalink / raw)


From: Christian Hesse <mail at eworm.de>

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 at linuxtv.org>
Signed-off-by: Christian Hesse <mail at eworm.de>
---
 ui-repolist.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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)
 
 	if (readfile(path, &buf, &size)) {
 		free(buf);
-		return -1;
+		return 0;
 	}
 
 	if (parse_date(buf, &date_buf) == 0)


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-11-22 12:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-22 10:12 [PATCH 1/1] ui-repolist: do not return unsigned (negative) value list
2019-11-22 12:30 ` Jason
2019-11-22 12:41   ` list

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).