]> err.no Git - dpkg/commitdiff
s/index/strchr/; the former is deprecated fileexclude
authorTollef Fog Heen <tfheen@err.no>
Sun, 20 Jul 2008 21:00:53 +0000 (23:00 +0200)
committerTollef Fog Heen <tfheen@err.no>
Sun, 20 Jul 2008 21:00:53 +0000 (23:00 +0200)
src/filters.c

index 2f5678413750c2039a6d83d38bf510faf7d3bc96..73b07687ea480cdacbf7ede9bf3c8676df7f65f3 100644 (file)
@@ -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);