[LTP] [PATCH 04/19] Unify error handling in lib/safe_file_ops.c

Cyril Hrubis chrubis@suse.cz
Thu Oct 29 17:17:14 CET 2020


Hi!
> > That's true for printf() scanf returns EOF instead. But I guess that
> > anything < 0 would work better than 1 which means that one input item
> > was matched successfuly...
> 
> These safe file functions could use some additional improvements but
> changing the return value is out of scope of my patchset. That would
> probably require reviewing and modifying some test code as well. The
> patchset is over 4000 lines long as is.

It's actually not since you are chaning the void functions to return
int, if you kept them void that would mean that it's out of scope.

Also actually FILE_PRINTF() can be replaced SAFE_FILE_PRINTF() for all
new library tests since tst_brk() does not exit cleanup() anymore so it
may as well be easier to just get rid of FILE_PRINTF() in new test
library.

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list