20 May
2014
20 May
'14
9:29 p.m.
On Tue, May 20, 2014 at 09:16:59PM +0200, Tomasz Figa wrote:
To me having NULL as either data argument of buffer done callback or private_data would be a serious driver bug and IMHO it's better to let it crash with a NULL pointer dereference to let someone notice than mask it by adding a condition.
Please, no. Regardless of who is at fault, crashes in library code are insanely frustrating to application developers. Error codes can be handled nicely and expressed to the user as an error message. Crashes are hideous for end users and usually end up being support nightmares for developers.
Related: https://git.kernel.org/cgit/linux/kernel/git/kay/libabc.git/tree/README?id=0...
Andrew