diff options
author | Dave Olien <dmo@osdl.org> | 2003-06-24 13:45:24 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-07 21:00:54 -0700 |
commit | 79ebcc247b65968e936e8521ef12ee6fb6d8ea79 (patch) | |
tree | 10c530feba1214659100ea373c8fa1147232da78 /show-parse.c | |
parent | [PATCH] minor sparse change fixing a typo (diff) | |
download | sparse-79ebcc247b65968e936e8521ef12ee6fb6d8ea79.tar.gz sparse-79ebcc247b65968e936e8521ef12ee6fb6d8ea79.tar.bz2 sparse-79ebcc247b65968e936e8521ef12ee6fb6d8ea79.zip |
[PATCH] another minor sparse change adding opnames.
Add more operations to the name list. Without these additions,
the "and" operator is displayed as a null pointer.
In the original code, the "&" operator was within the name[] array,
but didnt' have a string assigned to it. So printf() displayed it as
the string "null". While I was at it, I added other operation names to
the table.
Diffstat (limited to 'show-parse.c')
-rw-r--r-- | show-parse.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/show-parse.c b/show-parse.c index 71564f1..f05309a 100644 --- a/show-parse.c +++ b/show-parse.c @@ -607,7 +607,8 @@ static int show_binop(struct expression *expr) static const char *name[] = { ['+'] = "add", ['-'] = "sub", ['*'] = "mul", ['/'] = "div", - ['%'] = "mod" + ['%'] = "mod", ['&'] = "and", + ['|'] = "lor", ['^'] = "xor" }; unsigned int op = expr->op; |