[PATCH] dissect: use show_ident() to print dctx->ident

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 dissect.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/dissect.c b/dissect.c
index 499e0a0..6706690 100644
--- a/dissect.c
+++ b/dissect.c
@@ -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);
-- 
2.5.0





[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux