diff options
Diffstat (limited to 'scripts/mod/modpost.c')
-rw-r--r-- | scripts/mod/modpost.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 88921611b22e..ae89a17e60e0 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -1539,7 +1539,8 @@ static void get_markers(struct elf_info *info, struct module *mod) const char *name = strings + sym->st_value; const char *fmt = strchr(name, '\0') + 1; char *line = NULL; - asprintf(&line, "%s\t%s\t%s\n", name, mod->name, fmt); + /* JVS: check return value to avoid compiler warning */ + if (asprintf(&line, "%s\t%s\t%s\n", name, mod->name, fmt) == -1) ; NOFAIL(line); mod->markers[n++] = line; } @@ -1959,7 +1960,8 @@ static void write_dump(const char *fname) static void add_marker(struct module *mod, const char *name, const char *fmt) { char *line = NULL; - asprintf(&line, "%s\t%s\t%s\n", name, mod->name, fmt); + /* JVS: check return value to avoid compiler warning */ + if (asprintf(&line, "%s\t%s\t%s\n", name, mod->name, fmt) == -1) ; NOFAIL(line); mod->markers = NOFAIL(realloc(mod->markers, ((mod->nmarkers + 1) * |