提交 d6a238d2 编写于 作者: J Jim Cromie 提交者: Greg Kroah-Hartman

dynamic_debug: drop explicit !=NULL checks

Convert 'if (x !=NULL)' checks into 'if (x)'.
Signed-off-by: NJim Cromie <jim.cromie@gmail.com>
Signed-off-by: NJason Baron <jbaron@redhat.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 ae27f86a
...@@ -115,27 +115,26 @@ static void ddebug_change(const struct ddebug_query *query, ...@@ -115,27 +115,26 @@ static void ddebug_change(const struct ddebug_query *query,
list_for_each_entry(dt, &ddebug_tables, link) { list_for_each_entry(dt, &ddebug_tables, link) {
/* match against the module name */ /* match against the module name */
if (query->module != NULL && if (query->module && strcmp(query->module, dt->mod_name))
strcmp(query->module, dt->mod_name))
continue; continue;
for (i = 0 ; i < dt->num_ddebugs ; i++) { for (i = 0 ; i < dt->num_ddebugs ; i++) {
struct _ddebug *dp = &dt->ddebugs[i]; struct _ddebug *dp = &dt->ddebugs[i];
/* match against the source filename */ /* match against the source filename */
if (query->filename != NULL && if (query->filename &&
strcmp(query->filename, dp->filename) && strcmp(query->filename, dp->filename) &&
strcmp(query->filename, basename(dp->filename))) strcmp(query->filename, basename(dp->filename)))
continue; continue;
/* match against the function */ /* match against the function */
if (query->function != NULL && if (query->function &&
strcmp(query->function, dp->function)) strcmp(query->function, dp->function))
continue; continue;
/* match against the format */ /* match against the format */
if (query->format != NULL && if (query->format &&
strstr(dp->format, query->format) == NULL) !strstr(dp->format, query->format))
continue; continue;
/* match against the line number range */ /* match against the line number range */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册