misc: replace index() with strchr()
Type: improvement
Change-Id: I471e514ebef0b4c1f86067115b2ebe5a5517c6fb
Signed-off-by: Matus Fabian <matfabia@cisco.com>
diff --git a/src/vlib/format.c b/src/vlib/format.c
index 7de6417..9801062 100644
--- a/src/vlib/format.c
+++ b/src/vlib/format.c
@@ -198,7 +198,7 @@
return 0;
/* Brain-police user path input */
- if (strstr ((char *) filename, "..") || index ((char *) filename, '/'))
+ if (strstr ((char *) filename, "..") || strchr ((char *) filename, '/'))
{
vec_free (filename);
return 0;