dissect: use show_ident() to print dctx->ident
PATCH 1/1 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 <[email protected]>
--- dissect.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-)
dissect.c +3 -6
@@ -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);
Signature · 1 line
2.5.0