]> granicus.if.org Git - neomutt/commitdiff
buf,buflen for menu_make_entry()
authorRichard Russon <rich@flatcap.org>
Fri, 31 Aug 2018 14:50:22 +0000 (15:50 +0100)
committerRichard Russon <rich@flatcap.org>
Fri, 31 Aug 2018 23:15:59 +0000 (00:15 +0100)
menu.c

diff --git a/menu.c b/menu.c
index 7cb13b81f4bbca333c4d7bcced7a2ec548bd70c9..2a2ef281b2e783532e646b7be23b26f442bd67cb 100644 (file)
--- a/menu.c
+++ b/menu.c
@@ -307,20 +307,20 @@ static void print_enriched_string(int index, int attr, unsigned char *s, bool do
 
 /**
  * menu_make_entry - Create string to display in a Menu (the index)
- * @param s    Buffer for the result
- * @param l    Length of the buffer
+ * @param buf    Buffer for the result
+ * @param buflen Length of the buffer
  * @param menu Current Menu
  * @param i    Selected item
  */
-static void menu_make_entry(char *s, int l, struct Menu *menu, int i)
+static void menu_make_entry(char *buf, size_t buflen, struct Menu *menu, int i)
 {
   if (menu->dialog)
   {
-    strncpy(s, menu->dialog[i], l);
+    strncpy(buf, menu->dialog[i], buflen);
     menu->current = -1; /* hide menubar */
   }
   else
-    menu->make_entry(s, l, menu, i);
+    menu->make_entry(buf, buflen, menu, i);
 }
 
 /**