diff options
author | H. Peter Anvin <hpa@zytor.com> | 2016-10-04 01:12:28 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2016-10-04 01:12:28 -0700 |
commit | 436e367874fc488a9d7e9196d1366715c4f05c05 (patch) | |
tree | 223e96eab6ee2305672ab07ff7a7453dc708645f /asm/preproc-nop.c | |
parent | 9924d1ea8501543934545084339723901d408b92 (diff) | |
download | nasm-436e367874fc488a9d7e9196d1366715c4f05c05.tar.gz |
Factor out common string list handling code
Simplify the preprocessor code by factoring out the common string list
handling code.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'asm/preproc-nop.c')
-rw-r--r-- | asm/preproc-nop.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/asm/preproc-nop.c b/asm/preproc-nop.c index 5c93a849..1f9cc7e7 100644 --- a/asm/preproc-nop.c +++ b/asm/preproc-nop.c @@ -72,12 +72,7 @@ static void nop_reset(char *file, int pass, StrList **deplist) nasm_fatal(ERR_NOFILE, "unable to open input file `%s'", file); (void)pass; /* placate compilers */ - if (deplist) { - StrList *sl = nasm_malloc(strlen(file)+1+sizeof sl->next); - sl->next = NULL; - strcpy(sl->str, file); - *deplist = sl; - } + nasm_add_string_to_strlist(deplist, file); } static char *nop_getline(void) |