From: Darrick J. Wong Date: Mon, 29 Jul 2024 23:23:10 +0000 (-0700) Subject: xfs_scrub: rename UNICRASH_ZERO_WIDTH to UNICRASH_INVISIBLE X-Git-Tag: v6.10.0~15^2~5 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=1c209c45815cf70b7f66ae14f2537ea9f7eb01b2;p=xfsprogs-dev.git xfs_scrub: rename UNICRASH_ZERO_WIDTH to UNICRASH_INVISIBLE "Zero width" doesn't fully describe what the flag represents -- it gets set for any codepoint that doesn't render. Rename it accordingly. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig --- diff --git a/scrub/unicrash.c b/scrub/unicrash.c index e98f850ab..5447d94f0 100644 --- a/scrub/unicrash.c +++ b/scrub/unicrash.c @@ -109,7 +109,7 @@ struct unicrash { #define UNICRASH_CONTROL_CHAR (1 << 3) /* Invisible characters. Only a problem if we have collisions. */ -#define UNICRASH_ZERO_WIDTH (1 << 4) +#define UNICRASH_INVISIBLE (1 << 4) /* Multiple names resolve to the same skeleton string. */ #define UNICRASH_CONFUSABLE (1 << 5) @@ -298,7 +298,7 @@ name_entry_examine( while ((uchr = uiter_next32(&uiter)) != U_SENTINEL) { /* characters are invisible */ if (is_nonrendering(uchr)) - ret |= UNICRASH_ZERO_WIDTH; + ret |= UNICRASH_INVISIBLE; /* control characters */ if (u_iscntrl(uchr)) @@ -582,7 +582,7 @@ _("Unicode name \"%s\" in %s renders identically to \"%s\"."), * confused with another name as a result, we should complain. * "moocow" and "moocow" are misleading. */ - if ((badflags & UNICRASH_ZERO_WIDTH) && + if ((badflags & UNICRASH_INVISIBLE) && (badflags & UNICRASH_CONFUSABLE)) { str_warn(uc->ctx, descr_render(dsc), _("Unicode name \"%s\" in %s could be confused with '%s' due to invisible characters."),