]> diplodocus.org Git - nmh/commitdiff
Remove unneeded stat() call; was a leftover from the original MH
authorKen Hornstein <kenh@pobox.com>
Tue, 15 Oct 2013 18:48:19 +0000 (14:48 -0400)
committerKen Hornstein <kenh@pobox.com>
Tue, 15 Oct 2013 18:48:19 +0000 (14:48 -0400)
code where the owner of the folder was checked against the results of
getuid().

sbr/folder_read.c

index 170946b41ec351696a686da18bff73a2ae71869f..4a9f7fbaf68af5a87d29bd5d1bdc59f5e92e6ea3 100644 (file)
@@ -27,7 +27,6 @@ folder_read (char *name, int lockflag)
 {
     int msgnum, prefix_len, len, *mi;
     struct msgs *mp;
 {
     int msgnum, prefix_len, len, *mi;
     struct msgs *mp;
-    struct stat st;
     struct dirent *dp;
     DIR *dd;
     bvector_t *v;
     struct dirent *dp;
     DIR *dd;
     bvector_t *v;
@@ -39,11 +38,6 @@ folder_read (char *name, int lockflag)
        return NULL;
     }
 
        return NULL;
     }
 
-    if (stat (name, &st) == -1) {
-       free (name);
-       return NULL;
-    }
-
     /* Allocate the main structure for folder information */
     mp = (struct msgs *) mh_xmalloc ((size_t) sizeof(*mp));
 
     /* Allocate the main structure for folder information */
     mp = (struct msgs *) mh_xmalloc ((size_t) sizeof(*mp));