[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAO+b5-pLVD7qKeY0pyt_oA8Ba1URdE-e06hiH+6AFanNChPU0g@mail.gmail.com>
Date: Tue, 12 Jul 2011 11:20:45 +0200
From: Bart Van Assche <bvanassche@....org>
To: Jim Cromie <jim.cromie@...il.com>
Cc: jbaron@...hat.com, linux-kernel@...r.kernel.org, joe@...ches.com,
gregkh@...e.de, gnb@...h.org
Subject: Re: [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@...il.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@...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