lkml.org 
[lkml]   [2011]   [Jul]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 13/21] dynamic_debug: require 'a' flag to explicitly mark pending queries
On Mon, Jul 11, 2011 at 9:46 AM, Jim Cromie <jim.cromie@gmail.com> wrote:
> +static int queries_match(struct ddebug_query *q1, struct ddebug_query *q2)
> +{
> +       if (!q1->module ^ !q2->module ||
> +               !q1->filename ^ !q2->filename ||
> +               !q1->function ^ !q2->function ||
> +               !q1->format ^ !q2->format)
> +               return 0;  /* a match-spec set/unset state differs */
> +
> +       if (q1->last_lineno != q2->last_lineno ||
> +               q1->first_lineno != q2->first_lineno)
> +               return 0;
> +
> +       if ((q1->module && strcmp(q1->module, q2->module)) ||
> +               (q1->filename && strcmp(q1->filename, q2->filename)) ||
> +               (q1->function && strcmp(q1->function, q2->function)) ||
> +               (q1->format && strcmp(q1->format, q2->format)))
> +               return 0;
> +       return 1;
> +}

Is there a reason why the return type of this function is "int" and
not "bool" ? Also, in the Linux kernel you can use the symbolic
constants "true" and "false" instead of "1" and "0".

Bart.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2011-07-12 11:23    [from the cache]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog