chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
systemctl: drop usage of "internally loaded modules"
[elogind.git]
/
src
/
shared
/
socket-util.c
diff --git
a/src/shared/socket-util.c
b/src/shared/socket-util.c
index f6ddea31838512e4435cf4cad1882f1280f13adf..4933fe08e2ae20c0c83bd94d0aa62fdf3d3a33b9 100644
(file)
--- a/
src/shared/socket-util.c
+++ b/
src/shared/socket-util.c
@@
-68,7
+68,7
@@
int socket_address_parse(SocketAddress *a, const char *s) {
errno = 0;
if (inet_pton(AF_INET6, n, &a->sockaddr.in6.sin6_addr) <= 0) {
free(n);
errno = 0;
if (inet_pton(AF_INET6, n, &a->sockaddr.in6.sin6_addr) <= 0) {
free(n);
- return errno
!=
0 ? -errno : -EINVAL;
+ return errno
>
0 ? -errno : -EINVAL;
}
free(n);
}
free(n);
@@
-204,7
+204,7
@@
int socket_address_parse_netlink(SocketAddress *a, const char *s) {
errno = 0;
if (sscanf(s, "%ms %u", &sfamily, &group) < 1)
errno = 0;
if (sscanf(s, "%ms %u", &sfamily, &group) < 1)
- return errno ? -errno : -EINVAL;
+ return errno
> 0
? -errno : -EINVAL;
family = netlink_family_from_string(sfamily);
if (family < 0)
family = netlink_family_from_string(sfamily);
if (family < 0)