Document that `g_socket_address_get_native_size()` can return `-1` on errors
The following discussion from !1957 (merged) should be addressed:
-
@sdroege started a discussion: (+1 comment) socklen
can't possibly be negative if you check the function just above :) Maybe just assert here instead.No idea why
GSocketAddressClass::get_native_size
even returns agssize
if-1
or so are not documented as valid error cases andg_socket_address_to_native()
takes agsize
.It seems like
GInetSocketAddress
can return-1
so maybe we should document that the caller (of the generic function!) must always check against negative sizes.