chiark / gitweb /
fix warnings
authorThomas Hindoe Paaboel Andersen <phomes@gmail.com>
Fri, 6 Jun 2014 21:29:09 +0000 (23:29 +0200)
committerThomas Hindoe Paaboel Andersen <phomes@gmail.com>
Fri, 6 Jun 2014 21:31:25 +0000 (23:31 +0200)
Prevent use of uninitialized variable and removed a now unused
cleanup function for freeaddrinfo

src/core/socket.c
src/socket-proxy/socket-proxyd.c

index 9c4943e0bfd15cbc237302f4d2056e112f672bdf..4fb4b991e2e913f4521a232dccd88d9524693b59 100644 (file)
@@ -1410,7 +1410,7 @@ static int socket_chown(Socket *s, pid_t *_pid) {
                 }
 
                 LIST_FOREACH(port, p, s->ports) {
-                        const char *path;
+                        const char *path = NULL;
 
                         if (p->type == SOCKET_SOCKET)
                                 path = socket_address_get_path(&p->address);
index d54a05a0875c5d73c4efa2e933b131caecf4a280..b791305dc50657c905dd0d3dec22345c95fe884f 100644 (file)
@@ -47,9 +47,6 @@
 
 static const char *arg_remote_host = NULL;
 
-#define _cleanup_freeaddrinfo_ _cleanup_(freeaddrinfop)
-DEFINE_TRIVIAL_CLEANUP_FUNC(struct addrinfo *, freeaddrinfo);
-
 typedef struct Context {
         sd_event *event;
         sd_resolve *resolve;