Skip to content

Commit 2105b52

Browse files
rddunlapdavem330
authored andcommitted
lib: textsearch: fix escapes in example code
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: 5968a70 ("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>
1 parent 4094871 commit 2105b52

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/textsearch.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,9 @@
8989
* goto errout;
9090
* }
9191
*
92-
* pos = textsearch_find_continuous(conf, \&state, example, strlen(example));
92+
* pos = textsearch_find_continuous(conf, &state, example, strlen(example));
9393
* if (pos != UINT_MAX)
94-
* panic("Oh my god, dancing chickens at \%d\n", pos);
94+
* panic("Oh my god, dancing chickens at %d\n", pos);
9595
*
9696
* textsearch_destroy(conf);
9797
*/

0 commit comments

Comments
 (0)