lib: textsearch: fix escapes in example code
authorRandy Dunlap <rdunlap@infradead.org>
Thu, 3 Oct 2019 00:08:18 +0000 (17:08 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 3 Oct 2019 16:12:23 +0000 (12:12 -0400)
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>
lib/textsearch.c

index 4f16eec5d5544e8846d6545d4eb386712c52fb5f..f68dea8806be2770662f8cabecd4fcf2660eed62 100644 (file)
@@ -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);
  */