> I don't think this is a useful interface change. To my mind, your
> interface makes it easier to fail to check for errors and more dangerous to
> do so. That is, you can just ignore the error_t return value and an
> undetected error results in an uninitialized result parameter that the
> careless code will then try to use with unpredictable results. Conversely,
> with the interface that returns the pointer, a caller will never ignore the
> return value (because that's the only point of calling the function); a
> careless caller will then dereference a null pointer, which will crash
> quickly and clearly at that spot. When the only possible reason for
> failure is ENOMEM, there is no benefit in returning an error code.
Would you accept this change: same functions except, they return a
struct iouser *? E.g.
struct iouser *iohelp_create_simple_iouser (uid_t uid, gid_t gid);
etc.
PGP signature