projects
/
mmh
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
use memset to clear the msgstats in folder_realloc
[mmh]
/
sbr
/
folder_read.c
diff --git
a/sbr/folder_read.c
b/sbr/folder_read.c
index
1eeee00
..
011958f
100644
(file)
--- a/
sbr/folder_read.c
+++ b/
sbr/folder_read.c
@@
-33,7
+33,7
@@
folder_read(char *name)
struct dirent *dp;
DIR *dd;
struct dirent *dp;
DIR *dd;
- name = getcpy(toabsdir(name));
+ name = mh_xstrdup(toabsdir(name));
if (!(dd = opendir(name))) {
mh_free0(&name);
return NULL;
if (!(dd = opendir(name))) {
mh_free0(&name);
return NULL;
@@
-131,14
+131,6
@@
folder_read(char *name)
mp->msgstats = mh_xcalloc(MSGSTATSIZE(mp, mp->lowoff, mp->hghoff), 1);
/*
mp->msgstats = mh_xcalloc(MSGSTATSIZE(mp, mp->lowoff, mp->hghoff), 1);
/*
- ** Clear all the flag bits for all the message
- ** status entries we just allocated.
- ** TODO: use memset() ?
- */
- for (msgnum = mp->lowoff; msgnum <= mp->hghoff; msgnum++)
- clear_msg_flags(mp, msgnum);
-
- /*
** Scan through the array of messages we've seen and
** setup the initial flags for those messages in the
** newly allocated mp->msgstats area.
** Scan through the array of messages we've seen and
** setup the initial flags for those messages in the
** newly allocated mp->msgstats area.