diff options
author | Oleg Nesterov <oleg@redhat.com> | 2020-02-12 10:21:40 +0100 |
---|---|---|
committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2020-02-13 18:32:38 +0100 |
commit | c5e931373223bf2d16423f9740d5312a4d1900d1 (patch) | |
tree | 8997fe0920a0f0043a2d53a6a7d0b539f2b6b47c | |
parent | b50ae26fec7d566fe867851c46fc89bc622fa11b (diff) | |
download | sparse-c5e931373223bf2d16423f9740d5312a4d1900d1.tar.gz |
dissect: use show_ident() to print dctx->ident
I didn't know show_ident() uses 4 buffers for the string it returns and
thus it is safe to call it twice in a row.
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
-rw-r--r-- | dissect.c | 9 |
1 files changed, 3 insertions, 6 deletions
@@ -617,16 +617,13 @@ static inline struct symbol *do_symbol(struct symbol *sym) break; case SYM_FN: stmt = sym->ctype.modifiers & MOD_INLINE - ? type->inline_stmt - : type->stmt; + ? type->inline_stmt : type->stmt; if (!stmt) break; if (dctx) - sparse_error(dctx->pos, - "dissect_ctx change %.*s -> %s", - dctx->ident->len, dctx->ident->name, - show_ident(sym->ident)); + sparse_error(dctx->pos, "dissect_ctx change %s -> %s", + show_ident(dctx->ident), show_ident(sym->ident)); dissect_ctx = sym; do_sym_list(type->arguments); |