Skip to content

Commit

Permalink
lib/test-string_helpers: get rid of trailing comma in terminators
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
andy-shev authored and torvalds committed Jul 1, 2021
1 parent 229563b commit 6932569
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/test-string_helpers.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ static const struct test_string_2 escape0[] __initconst = {{
.flags = ESCAPE_SPACE | ESCAPE_HEX,
},{
/* terminator */
}},
}}
},{
.in = "\\h\\\"\a\e\\",
.s1 = {{
Expand All @@ -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 = {{
Expand Down Expand Up @@ -201,7 +201,7 @@ static const struct test_string_2 escape0[] __initconst = {{
.flags = ESCAPE_NP | ESCAPE_HEX,
},{
/* terminator */
}},
}}
},{
/* terminator */
}};
Expand All @@ -217,23 +217,23 @@ static const struct test_string_2 escape1[] __initconst = {{
.flags = ESCAPE_HEX,
},{
/* terminator */
}},
}}
},{
.in = "\\h\\\"\a\e\\",
.s1 = {{
.out = "\\134h\\134\"\a\e\\134",
.flags = ESCAPE_OCTAL,
},{
/* terminator */
}},
}}
},{
.in = "\eb \\C\007\"\x90\r]",
.s1 = {{
.out = "\e\\142\\040\\134C\007\"\x90\\015]",
.flags = ESCAPE_OCTAL,
},{
/* terminator */
}},
}}
},{
/* terminator */
}};
Expand Down

0 comments on commit 6932569

Please sign in to comment.