summaryrefslogtreecommitdiff
path: root/src/shared
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2012-10-31 21:44:54 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2012-11-13 02:23:02 +0100
commit6b6ed3e3eb629a822447e1266a137b8ff852aebf (patch)
tree71239b2b9a5046eb19974e1e3e54ba5f9abe687d /src/shared
parentbf9d233f781f27841be6638ee745e9c80bda5f4d (diff)
shared/socket-util: kill gcc warning about uninitialized variable
The warning was invalid, but distracting.
Diffstat (limited to 'src/shared')
-rw-r--r--src/shared/socket-util.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/shared/socket-util.c b/src/shared/socket-util.c
index 8bc3729857..49ea75880d 100644
--- a/src/shared/socket-util.c
+++ b/src/shared/socket-util.c
@@ -363,13 +363,12 @@ int socket_address_print(const SocketAddress *a, char **p) {
}
case AF_NETLINK: {
- char *sfamily;
+ char _cleanup_free_ *sfamily = NULL;
r = netlink_family_to_string_alloc(a->protocol, &sfamily);
if (r < 0)
return r;
r = asprintf(p, "%s %u", sfamily, a->sockaddr.nl.nl_groups);
- free(sfamily);
return 0;
}