(etags_set_definition_hash): make buf stack variable.

Signed-off-by: Andrew V. Samoilov <a.samoilov@gmail.com>
This commit is contained in:
Andrew V. Samoilov 2018-01-23 09:50:56 +02:00 committed by Andrew Borodin
parent d70a899c16
commit 06eac9f17d

View File

@ -54,7 +54,7 @@
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
static gboolean static gboolean
parse_define (char *buf, char **long_name, char **short_name, long *line) parse_define (const char *buf, char **long_name, char **short_name, long *line)
{ {
/* *INDENT-OFF* */ /* *INDENT-OFF* */
enum enum
@ -183,7 +183,7 @@ etags_set_definition_hash (const char *tagfile, const char *start_path,
/* *INDENT-ON* */ /* *INDENT-ON* */
FILE *f; FILE *f;
static char buf[BUF_LARGE]; char buf[BUF_LARGE];
char *chekedstr = NULL; char *chekedstr = NULL;
@ -241,14 +241,7 @@ etags_set_definition_hash (const char *tagfile, const char *start_path,
canonicalize_pathname (def_hash[num].fullpath); canonicalize_pathname (def_hash[num].fullpath);
def_hash[num].filename = g_strdup (filename); def_hash[num].filename = g_strdup (filename);
if (shortname) def_hash[num].short_define = g_strdup (shortname ? shortname : longname);
{
def_hash[num].short_define = g_strdup (shortname);
}
else
{
def_hash[num].short_define = g_strdup (longname);
}
def_hash[num].line = line; def_hash[num].line = line;
num++; num++;
} }