aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tokenize.c
diff options
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2018-12-03 15:54:58 +0100
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2018-12-09 16:39:33 +0100
commite206ae0348021d4d3c2c7c02f41fb5dbcf14cdb2 (patch)
tree86f192441f27f368ba06a5260187d82ffc9bf0a7 /tokenize.c
parentfff61b26c44a6ead0dde04f214f909f3269140b8 (diff)
downloadsparse-dev-e206ae0348021d4d3c2c7c02f41fb5dbcf14cdb2.tar.gz
as-name: add and use show_as()
Use a function to display the address spaces. This will allow to display a real name instead of '<asn:1>'. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'tokenize.c')
-rw-r--r--tokenize.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tokenize.c b/tokenize.c
index 5ee4718d..d8bbef49 100644
--- a/tokenize.c
+++ b/tokenize.c
@@ -88,13 +88,13 @@ const char *show_special(int val)
const char *show_ident(const struct ident *ident)
{
- static char buff[2][256];
+ static char buff[4][256];
static int n;
char *buffer;
if (!ident)
return "<noident>";
- buffer = buff[2 & ++n];
+ buffer = buff[3 & ++n];
sprintf(buffer, "%.*s", ident->len, ident->name);
return buffer;
}