| From 8d9b32b6e148f0245115669117619b0bf78067f8 Mon Sep 17 00:00:00 2001 |
| From: Sasha Levin <sashal@kernel.org> |
| Date: Wed, 2 Oct 2019 17:08:18 -0700 |
| Subject: lib: textsearch: fix escapes in example code |
| |
| From: Randy Dunlap <rdunlap@infradead.org> |
| |
| [ Upstream commit 2105b52e30debe7f19f3218598d8ae777dcc6776 ] |
| |
| This textsearch code example does not need the '\' escapes and they can |
| be misleading to someone reading the example. Also, gcc and sparse warn |
| that the "\%d" is an unknown escape sequence. |
| |
| Fixes: 5968a70d7af5 ("textsearch: fix kernel-doc warnings and add kernel-api section") |
| Signed-off-by: Randy Dunlap <rdunlap@infradead.org> |
| Cc: "David S. Miller" <davem@davemloft.net> |
| Cc: netdev@vger.kernel.org |
| Signed-off-by: David S. Miller <davem@davemloft.net> |
| Signed-off-by: Sasha Levin <sashal@kernel.org> |
| --- |
| lib/textsearch.c | 4 ++-- |
| 1 file changed, 2 insertions(+), 2 deletions(-) |
| |
| diff --git a/lib/textsearch.c b/lib/textsearch.c |
| index 4f16eec5d5544..f68dea8806be2 100644 |
| --- a/lib/textsearch.c |
| +++ b/lib/textsearch.c |
| @@ -89,9 +89,9 @@ |
| * goto errout; |
| * } |
| * |
| - * pos = textsearch_find_continuous(conf, \&state, example, strlen(example)); |
| + * pos = textsearch_find_continuous(conf, &state, example, strlen(example)); |
| * if (pos != UINT_MAX) |
| - * panic("Oh my god, dancing chickens at \%d\n", pos); |
| + * panic("Oh my god, dancing chickens at %d\n", pos); |
| * |
| * textsearch_destroy(conf); |
| */ |
| -- |
| 2.20.1 |
| |