[vlc-devel] [PATCH 1/2] Use standard error codes
Rémi Denis-Courmont
remi at remlab.net
Mon May 20 14:42:59 CEST 2019
Hi,
So what do you want to do? Passing errors via errno, or some VLC-specific TLS, is even more error-prone, than using negative values, AFAICT.
Besides, the worse thing that happens is a -1 return gets mistaken for -EPERM (or whatever depending on OS), and we get a "Permission denied" error in the log.
If you prefer, we can shift all errors by -256 and reserve -1..-255 ?
Le 20 mai 2019 15:01:08 GMT+03:00, Francois Cartegnie <fcvlcdev at free.fr> a écrit :
>Le 19/05/2019 à 19:46, Rémi Denis-Courmont a écrit :
>> While this is not complete nor free of ambiguities, this enables a
>lot
>> more expressive error values than the current tiny set. And even
>then,
>> mostly only VLC_EGENERIC and VLC_ENOMEM are ever used.
>>
>> This also allows passing errors from the CRT or OS.
>
>Assuming there's plenty of returns not using defines,
>there's months of spotting and fixing regressions to come.
>
>--
>Francois Cartegnie
>VideoLAN - VLC Developer
>_______________________________________________
>vlc-devel mailing list
>To unsubscribe or modify your subscription options:
>https://mailman.videolan.org/listinfo/vlc-devel
--
Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20190520/2a1467f2/attachment.html>
More information about the vlc-devel
mailing list