On 7/23/19 5:38 PM, Stephen Hemminger wrote:
On Tue, 23 Jul 2019 15:07:51 +0100
Andrew Rybchenko <arybche...@solarflare.com> wrote:
void return value is bad for get API (like rte_eth_dev_info-get())
since caller does not know if the function does its job or not and
output value is filled in.
void return value is bad for state changing API (like
rte_eth_promiscuous_enable()) since caller should use get API
to understand if state is really changed.
Signed-off-by: Andrew Rybchenko <arybche...@solarflare.com>
In general this is a good ide, but for some API's it is hard
to think of a way it would help. For example:
void return is ok for close routines because if close() returns
an error the application really has no choice about what to do.
Yes, I agree. But application can always ignore return value.
Long-long time ago it was a surprise to me that libc close() has
non-void return value.
I intentionally provided everything which makes sense to me to
raise discussion. I was unsure in stop, close and owner delete
functions.