listing: Don't try to open non-specified listing

By default we setup @listname to '\0' and if has
not been specified in command line it is passed
in this form into list_init() which cause

 | [cyrill@uranus nasm.git] ./nasm -felf64 t.asm
 | nasm: error: unable to open listing file `'

So make a proper test here.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
This commit is contained in:
Cyrill Gorcunov 2016-03-04 20:44:42 +03:00
parent a9a1b5c318
commit 92c02bb50d

View File

@ -128,7 +128,7 @@ static void list_emit(void)
static void list_init(const char *fname)
{
if (!fname) {
if (!fname || fname[0] == '\0') {
listfp = NULL;
return;
}