diff options
Diffstat (limited to 'gdb/language.c')
-rw-r--r-- | gdb/language.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gdb/language.c b/gdb/language.c index 121e8ad..b6fe77e 100644 --- a/gdb/language.c +++ b/gdb/language.c @@ -568,8 +568,9 @@ add_language (const struct language_defn *lang) /* Build the language names array, to be used as enumeration in the set language" enum command. */ - language_names = xrealloc (language_names, - (languages_size + 1) * sizeof (const char *)); + language_names = XRESIZEVEC (const char *, language_names, + languages_size + 1); + for (i = 0; i < languages_size; ++i) language_names[i] = languages[i]->la_name; language_names[i] = NULL; |