~emersion/public-inbox

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
2 2

[PATCH kanshi] Reset errno before calling fgetc

Details
Message ID
<20230411014253.4636-1-mail@ookami.one>
DKIM signature
pass
Download raw message
Patch: +1 -0
kanshi might fail to reload configuration with EAGAIN here.

This is because fgetc only sets errno when error occurred, but won't
clear errno when there's no error.
---
 parser.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/parser.c b/parser.c
index 5b774d9..1853ff7 100644
--- a/parser.c
+++ b/parser.c
@@ -33,6 +33,7 @@ static int parser_read_char(struct kanshi_parser *parser) {
		return ch;
	}

	errno = 0;
	int ch = fgetc(parser->f);
	if (ch == EOF) {
		if (errno != 0) {
-- 
2.40.0

[kanshi/patches/.build.yml] build success

builds.sr.ht <builds@sr.ht>
Details
Message ID
<CRTJNM0LAGHU.ZXAF5Z8V5XFJ@cirno2>
In-Reply-To
<20230411014253.4636-1-mail@ookami.one> (view parent)
DKIM signature
missing
Download raw message
kanshi/patches/.build.yml: SUCCESS in 30s

[Reset errno before calling fgetc][0] from [ookami][1]

[0]: https://lists.sr.ht/~emersion/public-inbox/patches/40292
[1]: mail@ookami.one

✓ #971461 SUCCESS kanshi/patches/.build.yml https://builds.sr.ht/~emersion/job/971461
Details
Message ID
<BYq8x9EJ7uw2rI0fNIO0301uWwBwF4-837El7IDo-zDAxM7RfBcbAy3gY0V0S80eiuofDtDvcPRnVOqrL51vvt927WrVuFpJLNmA-sUE3-E=@emersion.fr>
In-Reply-To
<20230411014253.4636-1-mail@ookami.one> (view parent)
DKIM signature
pass
Download raw message
Good catch! Pushed, thanks for the fix.
Reply to thread Export thread (mbox)