Use m_strncmp instead of strncmp
[apps/madmutt.git] / lib-ui / curs_main.c
index ddb5be5..aa09235 100644 (file)
@@ -924,15 +924,14 @@ int mutt_index_menu (void)
       if (op == OP_TOGGLE_READ) {
         char buffer[LONG_STRING];
 
-        if (!Context->pattern
-            || strncmp (Context->pattern, "!~R!~D~s", 8) != 0) {
+        if (m_strncmp (Context->pattern, "!~R!~D~s", 8) != 0) {
           snprintf (buffer, sizeof (buffer), "!~R!~D~s%s",
                     Context->pattern ? Context->pattern : ".*");
           set_option (OPTHIDEREAD);
         }
         else {
           m_strcpy(buf, sizeof(buf), Context->pattern + 8);
-          if (!*buf || strncmp (buf, ".*", 2) == 0)
+          if (m_strncmp (buf, ".*", 2) == 0)
             snprintf (buf, sizeof (buf), "~A");
           unset_option (OPTHIDEREAD);
         }