X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=filesetup.c;h=b246e0f951e99c6534ad201e960b5ba7262812ad;hb=583e0dfa7479be45b8a5ab7a53c9de88139683e4;hp=c115f7b16863a88f411427a424be06f3f558e56a;hpb=3d2d14bcb844e72809192311369a642c5d415472;p=fio.git diff --git a/filesetup.c b/filesetup.c index c115f7b1..b246e0f9 100644 --- a/filesetup.c +++ b/filesetup.c @@ -1608,8 +1608,9 @@ int add_file(struct thread_data *td, const char *fname, int numjob, int inc) f->file_name = strdup(file_name); else f->file_name = smalloc_strdup(file_name); - if (!f->file_name) - assert(0); + + /* can't handle smalloc failure from here */ + assert(f->file_name); get_file_type(f); @@ -1814,9 +1815,9 @@ void dup_files(struct thread_data *td, struct thread_data *org) __f->file_name = strdup(f->file_name); else __f->file_name = smalloc_strdup(f->file_name); - if (!__f->file_name) - assert(0); + /* can't handle smalloc failure from here */ + assert(__f->file_name); __f->filetype = f->filetype; }