plen = strlen(mp->foldpath) + 1;
for (np = m_defs; np; np = np->n_next) {
- if (strncmp(np->n_name, "atr-", alen)==0
- && (j = strlen(np->n_name) - plen) > alen
- && *(np->n_name + j) == '-'
- && strcmp(mp->foldpath, np->n_name + j + 1)
- == 0) {
+ if (strncmp(np->n_name, "atr-", alen)==0 &&
+ (j = strlen(np->n_name) - plen) > alen &&
+ *(np->n_name + j) == '-' &&
+ strcmp(mp->foldpath, np->n_name + j + 1)==0) {
cp = getcpy(np->n_name + alen);
*(cp + j - alen) = '\0';
if ((i = seq_init(mp, cp, getcpy(np->n_field))) != -1)
** Check if this is the cur sequence,
** so we can do some special things.
*/
- is_current = !strcmp(seq_cur, name);
+ is_current = (strcmp(seq_cur, name)==0);
/*
** Search for this sequence name to see if we've seen
** mesages in this folder.
*/
for (i = 0; mp->msgattrs[i]; i++) {
- if (!strcmp(mp->msgattrs[i], name)) {
+ if (strcmp(mp->msgattrs[i], name)==0) {
for (j = mp->lowmsg; j <= mp->hghmsg; j++)
clear_sequence(mp, i, j);
break;