summaryrefslogtreecommitdiff
path: root/preproc.c
diff options
context:
space:
mode:
authorCyrill Gorcunov <gorcunov@gmail.com>2011-04-13 13:15:02 +0400
committerCyrill Gorcunov <gorcunov@gmail.com>2011-06-25 18:16:54 +0400
commit3eba69a63a57b4172fd8e0b1e9fb42e0f87e6df9 (patch)
tree5b8568bb11e9558096671b17f7a2d2d992b9cb97 /preproc.c
parent396b5dfe954fc6f1e1e9be5ed2def73ee1159605 (diff)
downloadnasm-3eba69a63a57b4172fd8e0b1e9fb42e0f87e6df9.tar.gz
nasm-3eba69a63a57b4172fd8e0b1e9fb42e0f87e6df9.tar.bz2
nasm-3eba69a63a57b4172fd8e0b1e9fb42e0f87e6df9.zip
preproc.c: Use list_reverse helper
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Diffstat (limited to 'preproc.c')
-rw-r--r--preproc.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/preproc.c b/preproc.c
index 8cdb79a..ff2be0f 100644
--- a/preproc.c
+++ b/preproc.c
@@ -539,17 +539,11 @@ static size_t nasm_unquote_cstr(char *qstr, enum preproc_token directive)
*/
static Token *reverse_tokens(Token *t)
{
- Token *prev = NULL;
- Token *next;
+ Token *prev, *next;
- while (t) {
- next = t->next;
- t->next = prev;
- prev = t;
- t = next;
- }
+ list_reverse(t, prev, next);
- return prev;
+ return t;
}
/*