From 61cc0e3d5182e723c7ce8acf2a27190579ceb311 Mon Sep 17 00:00:00 2001 From: Michael Meyer Date: Wed, 22 Jul 2020 09:25:05 -0400 Subject: [PATCH] Formatting --- src/bones.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/bones.c b/src/bones.c index cb3c9e0a6..c8ba12a14 100644 --- a/src/bones.c +++ b/src/bones.c @@ -664,15 +664,18 @@ bones_include_name(name) const char *name; { struct cemetery *bp; + int len; char buf[BUFSZ]; + /* prepare buffer by appending terminal hyphen to name, to avoid partial + * matches producing false positives */ Strcpy(buf, name); Strcat(buf, "-"); - int l = strlen(buf); + len = strlen(buf); if ((bp = g.level.bonesinfo)) { do { - if (!strncmp(bp->who, buf, l)) + if (!strncmp(bp->who, buf, len)) return TRUE; } while ((bp = bp->next) != (struct cemetery *) 0); }