diff options
author | Mattias Andrée <maandree@member.fsf.org> | 2015-12-29 16:10:07 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@member.fsf.org> | 2015-12-29 16:10:07 +0100 |
commit | 97721b5a152e8173ef4bab17f10e3ec22cc82c1f (patch) | |
tree | b8b737b88f4bceb0e34e22a7fbbcd6eebe75a8a9 /src/client.c | |
parent | fix warnings (diff) | |
download | sat-97721b5a152e8173ef4bab17f10e3ec22cc82c1f.tar.gz sat-97721b5a152e8173ef4bab17f10e3ec22cc82c1f.tar.bz2 sat-97721b5a152e8173ef4bab17f10e3ec22cc82c1f.tar.xz |
m
Signed-off-by: Mattias Andrée <maandree@member.fsf.org>
Diffstat (limited to '')
-rw-r--r-- | src/client.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/client.c b/src/client.c index 026813b..1bf8440 100644 --- a/src/client.c +++ b/src/client.c @@ -52,6 +52,7 @@ int send_command(enum command cmd, size_t n, const char *restrict msg) { struct sockaddr_un address; + const void *_cvoid; int fd = -1, start = 1, status, outfd, goterr = 0; const char *dir; pid_t pid; @@ -97,7 +98,7 @@ send_command(enum command cmd, size_t n, const char *restrict msg) /* Create socket. */ t ((fd = socket(PF_UNIX, SOCK_STREAM, 0)) == -1); - t (connect(fd, (struct sockaddr *)&address, (socklen_t)sizeof(address)) == -1); + t (connect(fd, (const struct sockaddr *)(_cvoid = &address), (socklen_t)sizeof(address)) == -1); /* Send message. */ t (write(fd, &cmd_, sizeof(cmd_)) < (ssize_t)sizeof(cmd_)); |