diff options
author | Quentin Young <qlyoung@cumulusnetworks.com> | 2017-05-12 23:37:36 +0200 |
---|---|---|
committer | Quentin Young <qlyoung@cumulusnetworks.com> | 2017-05-12 23:57:30 +0200 |
commit | ab87c0f350f8c844f31f9420d2be579482eb8250 (patch) | |
tree | 0a6c02b83589b2c4f49842d8c814f8cddf0e1ad5 /lib/grammar_sandbox.c | |
parent | bgpd: fixup bgpd: allow VPN next hop to be different AFI than NLRI next (diff) | |
download | frr-ab87c0f350f8c844f31f9420d2be579482eb8250.tar.xz frr-ab87c0f350f8c844f31f9420d2be579482eb8250.zip |
lib: use %p specifier for pointers
Fixes builds on ARM
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'lib/grammar_sandbox.c')
-rw-r--r-- | lib/grammar_sandbox.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/lib/grammar_sandbox.c b/lib/grammar_sandbox.c index 97de94321..0da7981fc 100644 --- a/lib/grammar_sandbox.c +++ b/lib/grammar_sandbox.c @@ -588,7 +588,7 @@ pretty_print_dot (FILE *ofd, unsigned opts, struct graph_node *start, return; snprintf(tokennum, sizeof(tokennum), "%d?", tok->type); - fprintf(ofd, " n%016llx [ shape=box, label=<", (unsigned long long)start); + fprintf(ofd, " n%p [ shape=box, label=<", start); fprintf(ofd, "<b>%s</b>", LOOKUP_DEF(tokennames, tok->type, tokennum)); if (tok->attr == CMD_ATTR_DEPRECATED) @@ -621,20 +621,13 @@ pretty_print_dot (FILE *ofd, unsigned opts, struct graph_node *start, struct graph_node *adj = vector_slot (start->to, i); // if this node is a vararg, just print * if (adj == start) { - fprintf(ofd, " n%016llx -> n%016llx;\n", - (unsigned long long)start, - (unsigned long long)start); + fprintf(ofd, " n%p -> n%p;\n", start, start); } else if (((struct cmd_token *)adj->data)->type == END_TKN) { //struct cmd_token *et = adj->data; - fprintf(ofd, " n%016llx -> end%016llx;\n", - (unsigned long long)start, - (unsigned long long)adj); - fprintf(ofd, " end%016llx [ shape=box, label=<end>, style = filled, fillcolor = \"#ffddaa\" ];\n", - (unsigned long long)adj); + fprintf(ofd, " n%p -> end%p;\n", start, adj); + fprintf(ofd, " end%p [ shape=box, label=<end>, style = filled, fillcolor = \"#ffddaa\" ];\n", adj); } else { - fprintf(ofd, " n%016llx -> n%016llx;\n", - (unsigned long long)start, - (unsigned long long)adj); + fprintf(ofd, " n%p -> n%p;\n", start, adj); size_t k; for (k = 0; k < stackpos; k++) if (stack[k] == adj) |