[PATCH] libkeymap: fix double kbdfile open

"Sertonix" <[email protected]> Fri, 17 May 2024 22:30:11 +0000
Newsgroups dev.linux.lists.kbd
Message-ID <[email protected]>
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 <[email protected]>
---
 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, st=
ruct kbdfile *fp)
 	i--;
 	pathname =3D kbdfile_get_pathname(ctx->stack[i]);
=20
-	if (kbdfile_find(s, include_dirpath1, include_suffixes, fp)) {
+	if (rc =3D kbdfile_find(s, include_dirpath1, include_suffixes, fp)) {
 		if ((rc =3D find_incl_file_near_fn(ctx, s, pathname, fp)) =3D=3D -1)
 			return rc;
 	}
--=20
2.45.1