lkml.org 
[lkml]   [2003]   [Jun]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[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.


--- 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/
\
 
 \ /
  Last update: 2005-03-22 13:36    [W:0.185 / U:0.788 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site