Stop relying on struct ordering and packing for peer.

This commit is contained in:
Ian Gulliver
2016-03-08 20:47:22 -08:00
parent d39cd62991
commit 3985182304
7 changed files with 14 additions and 16 deletions

View File

@@ -68,7 +68,7 @@ static void exec_del(struct exec *exec) {
}
static void exec_close_handler(struct peer *peer) {
struct exec *exec = (struct exec *) peer;
struct exec *exec = container_of(peer, struct exec, peer);
exec_harvest(exec);
uint32_t delay = wakeup_get_retry_delay_ms(1);
LOG(exec->id, "Will retry in %ds", delay / 1000);
@@ -159,7 +159,7 @@ static void exec_spawn(struct exec *exec) {
}
static void exec_spawn_wrapper(struct peer *peer) {
struct exec *exec = (struct exec *) peer;
struct exec *exec = container_of(peer, struct exec, peer);
exec_spawn(exec);
}