From cf08a3709125e5f6f5e1295cf32af4612ef8a65c Mon Sep 17 00:00:00 2001 From: Tollef Fog Heen Date: Sun, 20 Jul 2008 23:00:53 +0200 Subject: [PATCH] s/index/strchr/; the former is deprecated --- src/filters.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/filters.c b/src/filters.c index 2f567841..73b07687 100644 --- a/src/filters.c +++ b/src/filters.c @@ -230,12 +230,12 @@ do_filter_should_skip(struct TarInfo *ti) char *t_pc = m_strdup(t); char *tmp; - tmp = index(fs_pc, '/'); + tmp = strchr(fs_pc, '/'); if (tmp != NULL) { *tmp = '\0'; } - tmp = index(t_pc, '/'); + tmp = strchr(t_pc, '/'); if (tmp != NULL) { *tmp = '\0'; } @@ -244,7 +244,7 @@ do_filter_should_skip(struct TarInfo *ti) fs_pc, t_pc); if (fnmatch(fs_pc, t_pc, FNM_PATHNAME) == 0 && - index(t, '/') == NULL) { + strchr(t, '/') == NULL) { debug(dbg_eachfile, "do_filter reincluding %s", ti->Name); remove = 0; @@ -253,9 +253,9 @@ do_filter_should_skip(struct TarInfo *ti) free (fs_pc); free (t_pc); - if (index(t, '/') != NULL) { + if (strchr(t, '/') != NULL) { fs++; - t = index(t, '/'); + t = strchr(t, '/'); debug(dbg_eachfile, "do_filter 2(%s, %s)", fs, t); -- 2.39.5