Got rid of some code in f_name_cmp() that tried to make all the
authorWayne Davison <wayned@samba.org>
Mon, 14 Mar 2005 03:36:56 +0000 (03:36 +0000)
committerWayne Davison <wayned@samba.org>
Mon, 14 Mar 2005 03:36:56 +0000 (03:36 +0000)
dirname pointers to equivalent strings have identical pointers.

flist.c

diff --git a/flist.c b/flist.c
index 04133e2..2963cce 100644 (file)
--- a/flist.c
+++ b/flist.c
@@ -1674,18 +1674,6 @@ int f_name_cmp(struct file_struct *f1, struct file_struct *f2)
                if (!*c2) {
                        switch (state2) {
                        case s_DIR:
-                               if (state1 == s_SLASH && sorting_flist) {
-                                       int j;
-                                       /* Optimize for future comparisons. */
-                                       for (j = 0;
-                                            j < sorting_flist->count;
-                                            j++) {
-                                               struct file_struct *fp
-                                                   = sorting_flist->files[j];
-                                               if (fp->dirname == f2->dirname)
-                                                       fp->dirname = f1->dirname;
-                                       }
-                               }
                                state2 = s_SLASH;
                                c2 = (uchar*)"/";
                                break;