summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRandy Dunlap <rdunlap@infradead.org>2019-10-02 17:08:18 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-10-29 09:21:43 +0100
commit02e3417757279b4b5100a3cd4fd895333fa92499 (patch)
tree257b866867bf5d356658154ff34c5c1520a4be42
parent29c16b5ed525546ccd7a745b62e1f6c478a78430 (diff)
downloadlinux-stable-02e3417757279b4b5100a3cd4fd895333fa92499.tar.gz
linux-stable-02e3417757279b4b5100a3cd4fd895333fa92499.tar.bz2
linux-stable-02e3417757279b4b5100a3cd4fd895333fa92499.zip
lib: textsearch: fix escapes in example code
[ 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>
-rw-r--r--lib/textsearch.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/textsearch.c b/lib/textsearch.c
index 4f16eec5d554..f68dea8806be 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);
*/