X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=filesetup.c;h=b246e0f951e99c6534ad201e960b5ba7262812ad;hp=7cbce1327f8f21edb32159376be406841016ef62;hb=cefd2a94b408b9c3be0300edb1270a546e7f09fe;hpb=d3d378218e9e03411749b65451b32d7a7466ff61 diff --git a/filesetup.c b/filesetup.c index 7cbce132..b246e0f9 100644 --- a/filesetup.c +++ b/filesetup.c @@ -5,8 +5,6 @@ #include #include #include -#include -#include #include "fio.h" #include "smalloc.h" @@ -1610,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); @@ -1816,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; }