]> www.infradead.org Git - users/hch/xfsprogs.git/commitdiff
xfs_scrub: rename UNICRASH_ZERO_WIDTH to UNICRASH_INVISIBLE
authorDarrick J. Wong <djwong@kernel.org>
Wed, 3 Jul 2024 21:21:10 +0000 (14:21 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Tue, 9 Jul 2024 22:36:58 +0000 (15:36 -0700)
"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 <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
scrub/unicrash.c

index e98f850abd7817d62e36eeb534331a68105bab20..5447d94f033e9b6416030836d10e09bcd93c8fdb 100644 (file)
@@ -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.
         * "moo<zerowidthspace>cow" 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."),