mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-27 16:20:09 +01:00
The nm_close() wrapper should behave exactly the same as calling close() directly. This is well known, documented behavior. The only addition on top of that, should be the nm_assert() to catch double-closing. Prevously, when passing a negative file descriptor, we wouldn't properly set errno. Also, the call would not show up in strace, which it should (at least, if libc's close actually makes the syscall). I would argue, that passing a negative file descriptor is a bug already and we should never do that. Maybe we should even assert non-negative fds. I don't do that now, because I am not sufficiently confident. Anyway, the change should have not practical effect, because we shouldn't actually pass negative fds already. |
||
|---|---|---|
| .. | ||
| nm-utils | ||
| nm-common-macros.h | ||
| nm-dbus-compat.h | ||
| nm-default.h | ||
| nm-dispatcher-api.h | ||
| nm-meta-setting.c | ||
| nm-meta-setting.h | ||
| nm-test-libnm-utils.h | ||
| nm-test-utils-impl.c | ||
| nm-version-macros.h.in | ||