From: Tollef Fog Heen Date: Sun, 20 Jul 2008 21:00:53 +0000 (+0200) Subject: s/index/strchr/; the former is deprecated X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fheads%2Ffileexclude;p=dpkg s/index/strchr/; the former is deprecated --- 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);