X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=sbr%2Fseq_setunseen.c;h=bd57a2c5be8db2410b212d23c4bca4bd2e1abeaa;hp=e628393221d73ea3772941a91a92c8dc737a2046;hb=88b2142594d5ea1e8385dae5eca81eed1018c555;hpb=a7771fd2e83d64228fb675749fc936151249dbd3 diff --git a/sbr/seq_setunseen.c b/sbr/seq_setunseen.c index e628393..bd57a2c 100644 --- a/sbr/seq_setunseen.c +++ b/sbr/seq_setunseen.c @@ -8,6 +8,7 @@ */ #include +#include /* ** We scan through the folder and act upon all messages @@ -22,19 +23,23 @@ seq_setunseen(struct msgs *mp, int doadd) int n; char **ap, *cp, *dp; + if (mp->lowmsg == 0) { + return; + } + /* ** Get the list of sequences for Unseen-Sequence ** and split them. */ if ((cp = context_find(usequence))) { - dp = getcpy(cp); + dp = mh_xstrdup(cp); } else { /* not set in profile, thus use the default */ - dp = getcpy(seq_unseen); + dp = mh_xstrdup(seq_unseen); } if (!(ap = brkstring(dp, " ", "\n")) || !*ap) { /* contains no sequence name, i.e. we're finished */ - free(dp); + mh_free0(&dp); return; } @@ -61,5 +66,5 @@ seq_setunseen(struct msgs *mp, int doadd) } } - free(dp); + mh_free0(&dp); }