chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
unit: include peer identity in description of per-connection socket-activated services
[elogind.git]
/
src
/
shared
/
socket-util.c
diff --git
a/src/shared/socket-util.c
b/src/shared/socket-util.c
index 45ada7eb3ff6ee04d314a8c583edb82a8bec9911..4700b3bc9950a49c1fee8c19866e3b3fa1ee37c1 100644
(file)
--- a/
src/shared/socket-util.c
+++ b/
src/shared/socket-util.c
@@
-422,8
+422,7
@@
const char* socket_address_get_path(const SocketAddress *a) {
}
bool socket_ipv6_is_supported(void) {
}
bool socket_ipv6_is_supported(void) {
- char *l = 0;
- bool enabled;
+ _cleanup_free_ char *l = NULL;
if (access("/sys/module/ipv6", F_OK) != 0)
return 0;
if (access("/sys/module/ipv6", F_OK) != 0)
return 0;
@@
-433,10
+432,7
@@
bool socket_ipv6_is_supported(void) {
return 1;
/* If module was loaded with disable=1 no IPv6 available */
return 1;
/* If module was loaded with disable=1 no IPv6 available */
- enabled = l[0] == '0';
- free(l);
-
- return enabled;
+ return l[0] == '0';
}
bool socket_address_matches_fd(const SocketAddress *a, int fd) {
}
bool socket_address_matches_fd(const SocketAddress *a, int fd) {