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.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2015-03-13 23:42:17 -04:00
parent 39d0fd9c0c
commit d448c7927a
+1 -1
View File
@@ -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);