All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] another minor sparse change adding opnames.
@ 2003-06-23 21:35 Dave Olien
  0 siblings, 0 replies; only message in thread
From: Dave Olien @ 2003-06-23 21:35 UTC (permalink / raw)
  To: torvalds; +Cc: linux-kernel


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;
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-06-23 21:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-06-23 21:35 [PATCH] another minor sparse change adding opnames Dave Olien

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.