3 ms·
> The wayland_display_connect function returns EINVAL or an fd. Both are positive integers. It should instead return -EINVAL. Or maybe return -1 and set errno?
by smcameron 3y ago
> The wayland_display_connect function returns EINVAL or an fd. Both are positive integers. It should instead return -EINVAL.
Or maybe return -1 and set errno? I haven't seen many C programs that return negative errnos (excepting the linux kernel which uses negative errnos internally).
- dundarious 3y agoWhy continue with the mistakes of the C standard and go through a thread-local global variable instead of just a return value? Convention is often not a good justification.