Explicit checks for return values of strcmp().
[mmh] / sbr / m_convert.c
index df128d7..734bdb5 100644 (file)
@@ -79,7 +79,7 @@ m_convert(struct msgs *mp, char *name)
        ** ALLOW_BEYOND is set, and can appear only on its own.
        ** Also, it is available in any folder.
        */
-       if ((mp->msgflags & ALLOW_BEYOND) && !strcmp(cp, seq_beyond)) {
+       if ((mp->msgflags & ALLOW_BEYOND) && strcmp(cp, seq_beyond)==0) {
                addtosel(mp, getbeyond(mp));
                return 1;
        }
@@ -87,7 +87,7 @@ m_convert(struct msgs *mp, char *name)
        /*
        ** Handle the special all sequence: replace `a' with `f-l'
        */
-       if (!strcmp(cp, seq_all)) {
+       if (strcmp(cp, seq_all)==0) {
                cp = concat(seq_first, "-", seq_last, NULL);
        }
 
@@ -203,7 +203,7 @@ rangerr:
                */
                if (first > mp->hghmsg || first < mp->lowmsg ||
                                !does_exist(mp, first)) {
-                       if (!strcmp(name, seq_cur))
+                       if (strcmp(name, seq_cur)==0)
                                advise(NULL, "no current message");
                        else
                                /* this case seems to never be reached */
@@ -342,7 +342,7 @@ attr(struct msgs *mp, char *cp)
        int first = 0;
 
        /* hack for "c-..." */
-       if (!strcmp(cp, seq_cur))
+       if (strcmp(cp, seq_cur)==0)
                return 0;
        /* "c:..." -- this code need to be rewritten... */
        if (strncmp(seq_cur, cp, strlen(seq_cur))==0 &&
@@ -375,17 +375,17 @@ attr(struct msgs *mp, char *cp)
                ** seq:l
                */
                if (isalpha(*dp)) {
-                       if (!strcmp(dp, seq_prev)) {
+                       if (strcmp(dp, seq_prev)==0) {
                                convdir = -1;
                                first = (mp->curmsg > 0) && (mp->curmsg <= mp->hghmsg)
                                        ? mp->curmsg - 1 : mp->hghmsg;
-                       } else if (!strcmp(dp, seq_next)) {
+                       } else if (strcmp(dp, seq_next)==0) {
                                convdir = 1;
                                first = (mp->curmsg >= mp->lowmsg)
                                        ? mp->curmsg + 1 : mp->lowmsg;
-                       } else if (!strcmp(dp, seq_first)) {
+                       } else if (strcmp(dp, seq_first)==0) {
                                convdir = 1;
-                       } else if (!strcmp(dp, seq_last)) {
+                       } else if (strcmp(dp, seq_last)==0) {
                                convdir = -1;
                        } else
                                return BADLST;