From: "Sertonix" <sertonix@posteo.net>
To: <kbd@lists.linux.dev>
Subject: [PATCH] libkeymap: fix double kbdfile open
Date: Fri, 17 May 2024 22:30:11 +0000 [thread overview]
Message-ID: <D1C9X3HEC5WA.2YWGMZIFMJS77@posteo.net> (raw)
976867c3a84 (Rewrite libkbdfile library) changed kbdfile_find to error
when the file descriptor was already opened. Make sure kbdfile_find
isn't called again when kbdfile is found in include_dirpath1.
Signed-off-by: Sertonix <sertonix@posteo.net>
---
src/libkeymap/analyze.l | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/libkeymap/analyze.l b/src/libkeymap/analyze.l
index 9c4c747..dd94206 100644
--- a/src/libkeymap/analyze.l
+++ b/src/libkeymap/analyze.l
@@ -177,7 +177,7 @@ find_standard_incl_file(struct lk_ctx *ctx, char *s, struct kbdfile *fp)
i--;
pathname = kbdfile_get_pathname(ctx->stack[i]);
- if (kbdfile_find(s, include_dirpath1, include_suffixes, fp)) {
+ if (rc = kbdfile_find(s, include_dirpath1, include_suffixes, fp)) {
if ((rc = find_incl_file_near_fn(ctx, s, pathname, fp)) == -1)
return rc;
}
--
2.45.1
next reply other threads:[~2024-05-17 22:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-17 22:30 Sertonix [this message]
2024-05-20 10:44 ` [PATCH] libkeymap: fix double kbdfile open Alexey Gladkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=D1C9X3HEC5WA.2YWGMZIFMJS77@posteo.net \
--to=sertonix@posteo.net \
--cc=kbd@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox