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

Cyril Hrubis chrubis@suse.cz
Fri Oct 30 11:31:16 CET 2020


Hi!
> >> 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.
> 
> Changing return type from void to int is fully backwards compatible
> because the return value is ignored everywhere anyway.

However it exposes suboptimal interface that shouldn't have been exposed
in the first place. So I would rather leave these to return void so that
no new code starts to depend on the current behavior.

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list