aboutsummaryrefslogtreecommitdiffstats
path: root/src/vlib/format.c
diff options
context:
space:
mode:
authorMatus Fabian <matfabia@cisco.com>2024-07-22 09:56:01 +0200
committerFlorin Coras <florin.coras@gmail.com>2024-07-22 17:07:02 +0000
commit7f163b682a57f42bd9b39a7f2d7e4c1c67df8386 (patch)
tree91f761d8087a52f2ed72026c4a2badaa334392d8 /src/vlib/format.c
parent7561c45bcce4913620388a60be36dc1284d484a0 (diff)
misc: replace index() with strchr()
Type: improvement Change-Id: I471e514ebef0b4c1f86067115b2ebe5a5517c6fb Signed-off-by: Matus Fabian <matfabia@cisco.com>
Diffstat (limited to 'src/vlib/format.c')
-rw-r--r--src/vlib/format.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vlib/format.c b/src/vlib/format.c
index 7de6417be69..98010620a5d 100644
--- a/src/vlib/format.c
+++ b/src/vlib/format.c
@@ -198,7 +198,7 @@ unformat_vlib_tmpfile (unformat_input_t * input, va_list * args)
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;