summaryrefslogtreecommitdiffstats
path: root/lib/dynamic_debug.c
diff options
context:
space:
mode:
authorJim Cromie <jim.cromie@gmail.com>2011-12-19 17:12:39 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2012-01-24 12:46:46 -0800
commitd6a238d25014d0ff918410d73e2a6300bca5d1f1 (patch)
treec7abb490f1ff36b0336ca6d8206e4a772bd4ff2f /lib/dynamic_debug.c
parentae27f86a21eb9a9e005f06b126eb88662ba4f940 (diff)
downloadlinux-d6a238d25014d0ff918410d73e2a6300bca5d1f1.tar.bz2
dynamic_debug: drop explicit !=NULL checks
Convert 'if (x !=NULL)' checks into 'if (x)'. Signed-off-by: Jim Cromie <jim.cromie@gmail.com> Signed-off-by: Jason Baron <jbaron@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'lib/dynamic_debug.c')
-rw-r--r--lib/dynamic_debug.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c
index d232025cb85c..b199e0935053 100644
--- a/lib/dynamic_debug.c
+++ b/lib/dynamic_debug.c
@@ -115,27 +115,26 @@ static void ddebug_change(const struct ddebug_query *query,
list_for_each_entry(dt, &ddebug_tables, link) {
/* match against the module name */
- if (query->module != NULL &&
- strcmp(query->module, dt->mod_name))
+ if (query->module && strcmp(query->module, dt->mod_name))
continue;
for (i = 0 ; i < dt->num_ddebugs ; i++) {
struct _ddebug *dp = &dt->ddebugs[i];
/* match against the source filename */
- if (query->filename != NULL &&
+ if (query->filename &&
strcmp(query->filename, dp->filename) &&
strcmp(query->filename, basename(dp->filename)))
continue;
/* match against the function */
- if (query->function != NULL &&
+ if (query->function &&
strcmp(query->function, dp->function))
continue;
/* match against the format */
- if (query->format != NULL &&
- strstr(dp->format, query->format) == NULL)
+ if (query->format &&
+ !strstr(dp->format, query->format))
continue;
/* match against the line number range */