[PATCH] another minor sparse change adding opnames.

Dave Olien (dmo@osdl.org)
Mon, 23 Jun 2003 14:35:35 -0700


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.

--- sparse_original/show-parse.c 2003-06-10 11:02:22.000000000 -0700
+++ sparse_test/show-parse.c 2003-06-23 14:29:17.000000000 -0700
@@ -607,7 +607,8 @@
static const char *name[] = {
['+'] = "add", ['-'] = "sub",
['*'] = "mul", ['/'] = "div",
- ['%'] = "mod"
+ ['%'] = "mod", ['&'] = "and",
+ ['|'] = "lor", ['^'] = "xor"
};
unsigned int op = expr->op;

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/