lib/test-string_helpers: get rid of trailing comma in terminators
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Thu, 1 Jul 2021 01:55:26 +0000 (18:55 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 1 Jul 2021 18:06:04 +0000 (11:06 -0700)
Terminators by definition shouldn't accept anything behind.  Make them
robust by removing trailing commas.

Link: https://lkml.kernel.org/r/20210504180819.73127-9-andriy.shevchenko@linux.intel.com
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Chuck Lever <chuck.lever@oracle.com>
Cc: "J. Bruce Fields" <bfields@fieldses.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
lib/test-string_helpers.c

index 079fb12..3e2def9 100644 (file)
@@ -136,7 +136,7 @@ static const struct test_string_2 escape0[] __initconst = {{
                .flags = ESCAPE_SPACE | ESCAPE_HEX,
        },{
                /* terminator */
-       }},
+       }}
 },{
        .in = "\\h\\\"\a\e\\",
        .s1 = {{
@@ -150,7 +150,7 @@ static const struct test_string_2 escape0[] __initconst = {{
                .flags = ESCAPE_SPECIAL | ESCAPE_HEX,
        },{
                /* terminator */
-       }},
+       }}
 },{
        .in = "\eb \\C\007\"\x90\r]",
        .s1 = {{
@@ -201,7 +201,7 @@ static const struct test_string_2 escape0[] __initconst = {{
                .flags = ESCAPE_NP | ESCAPE_HEX,
        },{
                /* terminator */
-       }},
+       }}
 },{
        /* terminator */
 }};
@@ -217,7 +217,7 @@ static const struct test_string_2 escape1[] __initconst = {{
                .flags = ESCAPE_HEX,
        },{
                /* terminator */
-       }},
+       }}
 },{
        .in = "\\h\\\"\a\e\\",
        .s1 = {{
@@ -225,7 +225,7 @@ static const struct test_string_2 escape1[] __initconst = {{
                .flags = ESCAPE_OCTAL,
        },{
                /* terminator */
-       }},
+       }}
 },{
        .in = "\eb \\C\007\"\x90\r]",
        .s1 = {{
@@ -233,7 +233,7 @@ static const struct test_string_2 escape1[] __initconst = {{
                .flags = ESCAPE_OCTAL,
        },{
                /* terminator */
-       }},
+       }}
 },{
        /* terminator */
 }};