aboutsummaryrefslogtreecommitdiffstats
path: root/lib
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 15:46:46 -0500
commitd6a238d25014d0ff918410d73e2a6300bca5d1f1 (patch)
treec7abb490f1ff36b0336ca6d8206e4a772bd4ff2f /lib
parentae27f86a21eb9a9e005f06b126eb88662ba4f940 (diff)
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')
-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,
115 list_for_each_entry(dt, &ddebug_tables, link) { 115 list_for_each_entry(dt, &ddebug_tables, link) {
116 116
117 /* match against the module name */ 117 /* match against the module name */
118 if (query->module != NULL && 118 if (query->module && strcmp(query->module, dt->mod_name))
119 strcmp(query->module, dt->mod_name))
120 continue; 119 continue;
121 120
122 for (i = 0 ; i < dt->num_ddebugs ; i++) { 121 for (i = 0 ; i < dt->num_ddebugs ; i++) {
123 struct _ddebug *dp = &dt->ddebugs[i]; 122 struct _ddebug *dp = &dt->ddebugs[i];
124 123
125 /* match against the source filename */ 124 /* match against the source filename */
126 if (query->filename != NULL && 125 if (query->filename &&
127 strcmp(query->filename, dp->filename) && 126 strcmp(query->filename, dp->filename) &&
128 strcmp(query->filename, basename(dp->filename))) 127 strcmp(query->filename, basename(dp->filename)))
129 continue; 128 continue;
130 129
131 /* match against the function */ 130 /* match against the function */
132 if (query->function != NULL && 131 if (query->function &&
133 strcmp(query->function, dp->function)) 132 strcmp(query->function, dp->function))
134 continue; 133 continue;
135 134
136 /* match against the format */ 135 /* match against the format */
137 if (query->format != NULL && 136 if (query->format &&
138 strstr(dp->format, query->format) == NULL) 137 !strstr(dp->format, query->format))
139 continue; 138 continue;
140 139
141 /* match against the line number range */ 140 /* match against the line number range */