From 91aba2cb0afa8a811905d344c11de70d209a754c Mon Sep 17 00:00:00 2001 From: Jacqueline Garrahan Date: Tue, 14 Jul 2026 15:26:18 -0700 Subject: [PATCH] dbJLink: fix assignment-instead-of-compare in dbJLinkMapAll The guard used recname[0] = '\0' (assignment) instead of == , which wrote a NUL into the caller's string, truncating it to "", and evaluated to 0 so recname was left non-NULL pointing at "". Every record then failed the name comparison and nothing was mapped. Use ==, matching dbjlr. Co-Authored-By: Claude Opus 4.8 (1M context) --- modules/database/src/ioc/db/dbJLink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/database/src/ioc/db/dbJLink.c b/modules/database/src/ioc/db/dbJLink.c index d3aacf060..c710d5002 100644 --- a/modules/database/src/ioc/db/dbJLink.c +++ b/modules/database/src/ioc/db/dbJLink.c @@ -551,7 +551,7 @@ long dbJLinkMapAll(char *recname, jlink_map_fn rtn, void *ctx) DBENTRY * const pdbentry = &dbentry; long status; - if (recname && (recname[0] = '\0' || !strcmp(recname, "*"))) + if (recname && (recname[0] == '\0' || !strcmp(recname, "*"))) recname = NULL; dbInitEntry(pdbbase, pdbentry);