Re: [PATCH 2/5] ddb/db_sym.c: move assignment outside if

2013-11-24 Thread Samuel Thibault
Ivan Shmakov, le Sat 23 Nov 2013 09:26:08 +, a écrit : Guillem Jover guil...@hadrons.org writes: On Thu, 2013-11-21 at 13:11:05 +0100, Marin Ramesa wrote: […] db_sym_t sp; - if (sp = X_db_lookup(db_symtabs[i], sym_name)) { + boolean_t db_lookup; +

Re: [PATCH 2/5] ddb/db_sym.c: move assignment outside if

2013-11-24 Thread Samuel Thibault
Marin Ramesa, le Fri 22 Nov 2013 19:36:02 +0100, a écrit : Why not assign sp on its own? How to then check the truth value of the assignment? The assignment truth value is simply the value of the assignment itself. See the change I have just pushed. Samuel

Re: [PATCH 2/5] ddb/db_sym.c: move assignment outside if

2013-11-23 Thread Ivan Shmakov
Guillem Jover guil...@hadrons.org writes: On Thu, 2013-11-21 at 13:11:05 +0100, Marin Ramesa wrote: […] db_sym_t sp; - if (sp = X_db_lookup(db_symtabs[i], sym_name)) { + boolean_t db_lookup; + db_lookup = (int)(sp = X_db_lookup(db_symtabs[i],

Re: [PATCH 2/5] ddb/db_sym.c: move assignment outside if

2013-11-22 Thread Guillem Jover
On Thu, 2013-11-21 at 13:11:05 +0100, Marin Ramesa wrote: diff --git a/ddb/db_sym.c b/ddb/db_sym.c index 0819e08..359ec7c 100644 --- a/ddb/db_sym.c +++ b/ddb/db_sym.c @@ -276,7 +276,9 @@ db_name_is_ambiguous(sym_name) for (i = 0; i db_nsymtab; i++) { db_sym_t sp; -

Re: [PATCH 2/5] ddb/db_sym.c: move assignment outside if

2013-11-22 Thread Marin Ramesa
On 22.11.2013 19:21:32, Guillem Jover wrote: On Thu, 2013-11-21 at 13:11:05 +0100, Marin Ramesa wrote: diff --git a/ddb/db_sym.c b/ddb/db_sym.c index 0819e08..359ec7c 100644 --- a/ddb/db_sym.c +++ b/ddb/db_sym.c @@ -276,7 +276,9 @@ db_name_is_ambiguous(sym_name) for (i = 0; i

[PATCH 2/5] ddb/db_sym.c: move assignment outside if

2013-11-21 Thread Marin Ramesa
* ddb/db_sym.c: Move assignment outside of if. (db_lookup): New variable. --- ddb/db_sym.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ddb/db_sym.c b/ddb/db_sym.c index 0819e08..359ec7c 100644 --- a/ddb/db_sym.c +++ b/ddb/db_sym.c @@ -276,7 +276,9 @@