diff options
author | Lennart Poettering <lennart@poettering.net> | 2010-02-03 14:25:50 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2010-02-03 14:25:50 +0100 |
commit | 82ba9f087d96370b89ce4b635784e65f7cbd390c (patch) | |
tree | 6b84455378298f5594102cf67ffafc3e1816cd71 /socket.c | |
parent | a65d570117dc73a3af5084319b645ab1556562e5 (diff) |
socket: fix const issue
Diffstat (limited to 'socket.c')
-rw-r--r-- | socket.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -159,14 +159,14 @@ static void socket_dump(Unit *u, FILE *f, const char *prefix) { SocketExecCommand c; Socket *s = SOCKET(u); SocketPort *p; - char *prefix2; + const char *prefix2; + char *p2; assert(s); assert(f); - prefix2 = strappend(prefix, "\t"); - if (!prefix2) - prefix2 = ""; + p2 = strappend(prefix, "\t"); + prefix2 = p2 ? p2 : prefix; fprintf(f, "%sSocket State: %s\n" @@ -211,7 +211,7 @@ static void socket_dump(Unit *u, FILE *f, const char *prefix) { exec_command_dump_list(s->exec_command[c], f, prefix2); } - free(prefix2); + free(p2); } static void socket_close_fds(Socket *s) { |