[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1310370416-6322-18-git-send-email-jim.cromie@gmail.com>
Date: Mon, 11 Jul 2011 01:46:52 -0600
From: Jim Cromie <jim.cromie@...il.com>
To: jbaron@...hat.com
Cc: linux-kernel@...r.kernel.org, bvanassche@....org, joe@...ches.com,
gregkh@...e.de, gnb@...h.org, Jim Cromie <jim.cromie@...il.com>
Subject: [PATCH 17/21] dynamic_debug: non-optimization - remove != NULL
Reduce != NULL relational test to its 0/1 equivalent.
No code difference, may not be worth including.
Signed-off-by: Jim Cromie <jim.cromie@...il.com>
---
lib/dynamic_debug.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c
index 8dde999..1763cc2 100644
--- a/lib/dynamic_debug.c
+++ b/lib/dynamic_debug.c
@@ -142,18 +142,18 @@ static int query_matches_callsite(struct _ddebug *dp,
const struct ddebug_query *query)
{
/* match against the source filename */
- if (query->filename != NULL &&
+ if (query->filename &&
strcmp(query->filename, dp->filename) &&
strcmp(query->filename, basename(dp->filename)))
return 0;
/* match against the function */
- if (query->function != NULL &&
+ if (query->function &&
strcmp(query->function, dp->function))
return 0;
/* match against the format */
- if (query->format != NULL &&
+ if (query->format &&
strstr(dp->format, query->format) == NULL)
return 0;
--
1.7.4.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists