* [PATCH] lib: textsearch: fix escapes in example code
@ 2019-10-03 0:08 Randy Dunlap
0 siblings, 0 replies; only message in thread
From: Randy Dunlap @ 2019-10-03 0:08 UTC (permalink / raw)
To: netdev, David Miller; +Cc: Al Viro, linux-doc
From: Randy Dunlap <rdunlap@infradead.org>
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
---
lib/textsearch.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- lnx-54-rc1.orig/lib/textsearch.c
+++ lnx-54-rc1/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);
*/
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-10-03 0:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-03 0:08 [PATCH] lib: textsearch: fix escapes in example code Randy Dunlap
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).