Set errno and return -1 in public API calls like all other weston code does. Most systemd+dbus calls return negative error-codes instead of -1 and setting errno. Thus, we need to explicitly set errno before returning. Also note that we must set errno _after_ the cleanup path. Calling functions like close() in the cleanup path might overwrite errno (which is not what we want). So protect errno until the final return -1;dev
parent
f86c39058a
commit
fcb6bf43a4
Loading…
Reference in new issue