[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


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
>> more expressive error values than the current tiny set. And even
>> 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:

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