diff options
author | Cyrill Gorcunov <gorcunov@gmail.com> | 2011-11-20 10:42:13 +0400 |
---|---|---|
committer | Cyrill Gorcunov <gorcunov@gmail.com> | 2011-11-20 10:42:13 +0400 |
commit | 8a88750cd880cd830790e27d40f9e027d9b7f256 (patch) | |
tree | dd5129a8cd600c6c308b404e3bad0f4cec19e1f2 | |
parent | d96a329a78e07d60ad6200858bd7d28a7fbbe772 (diff) | |
download | nasm-8a88750cd880cd830790e27d40f9e027d9b7f256.tar.gz |
preproc: Proper bracing with list_for_each
It is a potential place for a bug if list_for_each
helper is used with multiple lines of code without
a proper bracing.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
-rw-r--r-- | preproc.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -4461,9 +4461,10 @@ again: * all, then think about checking for parameters if * necessary. */ - list_for_each(m, head) + list_for_each(m, head) { if (!mstrcmp(m->name, mname, m->casesense)) break; + } if (m) { mstart = tline; params = NULL; @@ -4827,9 +4828,10 @@ static ExpDef *is_mmacro(Token * tline, Token *** params_array) * count the parameters, and then we look further along the * list if necessary to find the proper ExpDef. */ - list_for_each(ed, head) + list_for_each(ed, head) { if (!mstrcmp(ed->name, tline->text, ed->casesense)) break; + } if (!ed) return NULL; @@ -4882,9 +4884,10 @@ static ExpDef *is_mmacro(Token * tline, Token *** params_array) * This one wasn't right: look for the next one with the * same name. */ - list_for_each(ed, ed->next) + list_for_each(ed, ed->next) { if (!mstrcmp(ed->name, tline->text, ed->casesense)) break; + } } /* |