diff options
| author | Quentin Young <qlyoung@cumulusnetworks.com> | 2017-05-12 21:37:36 +0000 |
|---|---|---|
| committer | Quentin Young <qlyoung@cumulusnetworks.com> | 2017-05-12 21:57:30 +0000 |
| commit | ab87c0f350f8c844f31f9420d2be579482eb8250 (patch) | |
| tree | 0a6c02b83589b2c4f49842d8c814f8cddf0e1ad5 /lib/grammar_sandbox.c | |
| parent | 42025b43f265c042116d9432cf4d34aeb79152f6 (diff) | |
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 97de943216..0da7981fc1 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) |
