]> granicus.if.org Git - neomutt/commitdiff
Replace `new` variable with `new_label`
authorFederico Kircheis <federico.kircheis@gmail.com>
Wed, 3 Jul 2019 19:26:16 +0000 (21:26 +0200)
committerRichard Russon <rich@flatcap.org>
Fri, 5 Jul 2019 01:34:06 +0000 (02:34 +0100)
`new` is a reserved keyword in c++

mutt_header.c

index ecb55c13af56b74a5b395214395ec5ff7efd419a..2c3dede51b8acb035323f06b1f03566e133d9018 100644 (file)
@@ -129,7 +129,6 @@ int mutt_label_message(struct Mailbox *m, struct EmailList *el)
     return 0;
 
   char buf[1024] = { 0 };
-  char *new = NULL;
 
   struct EmailNode *en = STAILQ_FIRST(el);
   if (!STAILQ_NEXT(en, entries))
@@ -142,15 +141,15 @@ int mutt_label_message(struct Mailbox *m, struct EmailList *el)
   if (mutt_get_field("Label: ", buf, sizeof(buf), MUTT_LABEL /* | MUTT_CLEAR */) != 0)
     return 0;
 
-  new = buf;
-  SKIPWS(new);
-  if (*new == '\0')
-    new = NULL;
+  char *new_label = buf;
+  SKIPWS(new_label);
+  if (*new_label == '\0')
+    new_label = NULL;
 
   int changed = 0;
   STAILQ_FOREACH(en, el, entries)
   {
-    if (label_message(m, en->email, new))
+    if (label_message(m, en->email, new_label))
     {
       changed++;
       mutt_set_header_color(m, en->email);