misc: replace index() with strchr()
Type: improvement
Change-Id: I471e514ebef0b4c1f86067115b2ebe5a5517c6fb
Signed-off-by: Matus Fabian <matfabia@cisco.com>
diff --git a/src/svm/svmdb.c b/src/svm/svmdb.c
index 3c69dbf..98bb96f 100644
--- a/src/svm/svmdb.c
+++ b/src/svm/svmdb.c
@@ -436,7 +436,7 @@
u8 *sanitized_name = 0;
int fd = 0;
- if (strstr (filename, "..") || index (filename, '/'))
+ if (strstr (filename, "..") || strchr (filename, '/'))
{
error = clib_error_return (0, "Illegal characters in filename '%s'",
filename);