Skip to content
Snippets Groups Projects
Commit aa3dc884 authored by Michael Tüxen's avatar Michael Tüxen
Browse files

Avoid pointer arithmetic involving void pointers.

parent 7df1bfc3
No related branches found
No related tags found
No related merge requests found
...@@ -227,7 +227,7 @@ static void wire_client_receive_packets_done(struct wire_client *wire_client) ...@@ -227,7 +227,7 @@ static void wire_client_receive_packets_done(struct wire_client *wire_client)
/* Die with the error message from the server, which /* Die with the error message from the server, which
* is a C string following the fixed "done" message. * is a C string following the fixed "done" message.
*/ */
die("%s", (char *)(buf + sizeof(done))); die("%s", (char *)buf + sizeof(done));
} else if (ntohl(done.num_events) != wire_client->num_events) { } else if (ntohl(done.num_events) != wire_client->num_events) {
char *msg = NULL; char *msg = NULL;
asprintf(&msg, "bad wire server: bad message count: " asprintf(&msg, "bad wire server: bad message count: "
......
...@@ -179,7 +179,7 @@ static int write_bytes(struct wire_conn *conn, ...@@ -179,7 +179,7 @@ static int write_bytes(struct wire_conn *conn,
} }
assert(bytes_written <= buf_len); assert(bytes_written <= buf_len);
buf_len -= bytes_written; buf_len -= bytes_written;
buf += bytes_written; buf = (char *)buf + bytes_written;
} }
return STATUS_OK; return STATUS_OK;
} }
...@@ -223,7 +223,7 @@ static int read_bytes(struct wire_conn *conn, ...@@ -223,7 +223,7 @@ static int read_bytes(struct wire_conn *conn,
} }
assert(bytes_read <= buf_len); assert(bytes_read <= buf_len);
buf_len -= bytes_read; buf_len -= bytes_read;
buf += bytes_read; buf = (char *)buf + bytes_read;
} }
return STATUS_OK; return STATUS_OK;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment