diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2015-03-13 21:11:05 -0500 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2015-03-13 23:42:17 -0400 |
commit | d448c7927a8b75a9023b925e82a3109cfd490d70 (patch) | |
tree | eeb943db82669f6e99ca3061cb89473c7c27db6f | |
parent | 39d0fd9c0cb9a39779d3466bd22a5fe6b3ed9fa5 (diff) |
sd-resolve: use different element of union to make code more readable
They both point to the same location, but the reader
is not forced to look back to the beginning of the function
to see that.
-rw-r--r-- | src/libsystemd/sd-resolve/sd-resolve.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsystemd/sd-resolve/sd-resolve.c b/src/libsystemd/sd-resolve/sd-resolve.c index ca517861d9..8aec75aa47 100644 --- a/src/libsystemd/sd-resolve/sd-resolve.c +++ b/src/libsystemd/sd-resolve/sd-resolve.c @@ -450,7 +450,7 @@ static int handle_request(int out_fd, const Packet *packet, size_t length) { assert(length >= sizeof(ResRequest)); assert(length == sizeof(ResRequest) + res_req->dname_len); - dname = (const char *) req + sizeof(ResRequest); + dname = (const char *) res_req + sizeof(ResRequest); if (req->type == REQUEST_RES_QUERY) ret = res_query(dname, res_req->class, res_req->type, (unsigned char *) &answer, BUFSIZE); |