[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 10/19] ddb/db_sym.c: add parentheses around assignment used a
From: |
Guillem Jover |
Subject: |
Re: [PATCH 10/19] ddb/db_sym.c: add parentheses around assignment used as truth value |
Date: |
Wed, 20 Nov 2013 21:20:25 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Wed, 2013-11-20 at 13:53:52 +0100, Marin Ramesa wrote:
> diff --git a/ddb/db_sym.c b/ddb/db_sym.c
> index 98f265e..dad0ead 100644
> --- a/ddb/db_sym.c
> +++ b/ddb/db_sym.c
> @@ -276,7 +276,7 @@ db_name_is_ambiguous(sym_name)
>
> for (i = 0; i < db_nsymtab; i++) {
> db_sym_t sp;
> - if (sp = X_db_lookup(&db_symtabs[i], sym_name)) {
> + if ((sp = X_db_lookup(&db_symtabs[i], sym_name))) {
> if (found_once)
> {
> db_free_symbol(sp);
You could also move the assignment outside of the if condition.
Thanks,
Guillem
- [PATCH 06/19] ddb: fix implicit declaration of function, (continued)
[PATCH 10/19] ddb/db_sym.c: add parentheses around assignment used as truth value, Marin Ramesa, 2013/11/20
- Re: [PATCH 10/19] ddb/db_sym.c: add parentheses around assignment used as truth value,
Guillem Jover <=
[PATCH 11/19] ddb/db_variables.c: fix initializations from incompatible pointer type, Marin Ramesa, 2013/11/20
[PATCH 12/19] ipc/ipc_print.h: include ipc/ipc_pset.h for ipc_pset_t, Marin Ramesa, 2013/11/20
[PATCH 13/19] kern/startup.c: fix implicit declaration of function, Marin Ramesa, 2013/11/20
[PATCH 14/19] kern/xpr.c: quiet warning about uninitialized variable, Marin Ramesa, 2013/11/20
[PATCH 15/19] device/net_io.c: quiet the warning about uninitialized variable, Marin Ramesa, 2013/11/20
[PATCH 16/19] Fix implicit declaration of function, Marin Ramesa, 2013/11/20
[PATCH 17/19] i386/i386at/kd.c: add forward declaration, Marin Ramesa, 2013/11/20