From 6102bcfce46fd357566941d565b95f78510af79b Mon Sep 17 00:00:00 2001 From: Lars Hjemli Date: Sun, 18 May 2008 23:10:05 +0200 Subject: cache.c: read(2) returns -1 on error, not 0 Noticed-by: Jim Meyering Signed-off-by: Lars Hjemli --- cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cache.c b/cache.c index b701e13..add647e 100644 --- a/cache.c +++ b/cache.c @@ -52,7 +52,7 @@ static int open_slot(struct cache_slot *slot) return errno; slot->bufsize = read(slot->cache_fd, slot->buf, sizeof(slot->buf)); - if (slot->bufsize == 0) + if (slot->bufsize < 0) return errno; bufz = memchr(slot->buf, 0, slot->bufsize); -- cgit 1.4.1 cb784a'>this commit Advent of Code
summary refs log tree commit diff homepage
Commit message (Collapse)Author
2020-11-22Day 7, part 2June McEnroe
I don't even know what this is. Don't look at it.
2020-11-22Day 7June McEnroe
2020-11-22Day 6, part 2June McEnroe
2020-11-22Day 6June McEnroe
2020-11-22Day 5, part 2June McEnroe
2020-11-22Day 5June McEnroe
2020-11-22Day 4, part 2June McEnroe
That ugly sort map though.
2020-11-22Day 4June McEnroe
2020-11-22Day 3, part 2June McEnroe
I am super surprised that worked on the first try.
2020-11-22Day 3, clean upJune McEnroe
2020-11-22Day 3June McEnroe
This is fucking awful and I'm angry.
2020-11-22Day 2, part 2June McEnroe
2020-11-22Day 2June McEnroe
2020-11-22Day 1, part 2June McEnroe
2020-11-22Day 1June McEnroe
2020-11-22Move to 2016 directoryJune McEnroe