Fix a segfault caused by under-allocating an array.
[deliverable/binutils-gdb.git] / gdb / demangle.c
index 29174f5f956731172a8b1d4691ec5bf0471b1530..b4a76a1c169158b9fe4f80c4928584c865ecc746 100644 (file)
@@ -41,7 +41,7 @@
 #define DEFAULT_DEMANGLING_STYLE AUTO_DEMANGLING_STYLE_STRING
 #endif
 
-extern void _initialize_demangler PARAMS ((void));
+extern void _initialize_demangler (void);
 
 /* String name for the current demangling style.  Set by the
    "set demangle-style" command, printed as part of the output by the
@@ -101,8 +101,7 @@ demanglers[] =
   }
 };
 
-static void
-set_demangling_command PARAMS ((char *, int, struct cmd_list_element *));
+static void set_demangling_command (char *, int, struct cmd_list_element *);
 
 /* Set current demangling style.  Called by the "set demangle-style"
    command after it has updated the current_demangling_style_string to
@@ -121,10 +120,7 @@ set_demangling_command PARAMS ((char *, int, struct cmd_list_element *));
    a malloc'd string, even if it is a null-string. */
 
 static void
-set_demangling_command (ignore, from_tty, c)
-     char *ignore;
-     int from_tty;
-     struct cmd_list_element *c;
+set_demangling_command (char *ignore, int from_tty, struct cmd_list_element *c)
 {
   const struct demangler *dem;
 
@@ -185,8 +181,7 @@ set_demangling_command (ignore, from_tty, c)
 /* Fake a "set demangle-style" command. */
 
 void
-set_demangling_style (style)
-     char *style;
+set_demangling_style (char *style)
 {
   if (current_demangling_style_string != NULL)
     {
@@ -216,14 +211,13 @@ static char cplus_markers[] =
 {CPLUS_MARKER, '.', '$', '\0'};
 
 int
-is_cplus_marker (c)
-     int c;
+is_cplus_marker (int c)
 {
   return c && strchr (cplus_markers, c) != NULL;
 }
 
 void
-_initialize_demangler ()
+_initialize_demangler (void)
 {
   struct cmd_list_element *set, *show;
 
This page took 0.02495 seconds and 4 git commands to generate.