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

* [PATCH 1/1] ui-repolist: do not return unsigned (negative) value
  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
  0 siblings, 1 reply; 3+ messages in thread
From: Jason @ 2019-11-22 12:30 UTC (permalink / raw)


Thanks, stick it in ch/for-jason and I'll merge it for next release.


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

* [PATCH 1/1] ui-repolist: do not return unsigned (negative) value
  2019-11-22 12:30 ` Jason
@ 2019-11-22 12:41   ` list
  0 siblings, 0 replies; 3+ messages in thread
From: list @ 2019-11-22 12:41 UTC (permalink / raw)


"Jason A. Donenfeld" <Jason at zx2c4.com> on Fri, 2019/11/22 13:30:
> Thanks, stick it in ch/for-jason and I'll merge it for next release.

Done. (Same for changes to update to git 2.24.0.)
-- 
main(a){char*c=/*    Schoene Gruesse                         */"B?IJj;MEH"
"CX:;",b;for(a/*    Best regards             my address:    */=0;b=c[a++];)
putchar(b-1/(/*    Chris            cc -ox -xc - && ./x    */b/42*2-3)*42);}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.zx2c4.com/pipermail/cgit/attachments/20191122/79bbd01f/attachment.asc>


^ 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).