[Spice-commits] server/reds.c
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Feb 6 17:44:20 UTC 2020
server/reds.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
New commits:
commit 7026f12c1bb5c33623facb655d63c5270063c2f0
Author: Frediano Ziglio <fziglio at redhat.com>
Date: Mon Aug 19 15:00:51 2019 +0100
reds: Small style change in reds_marshall_migrate_data
Store computed value in a variable to shorten code.
Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
diff --git a/server/reds.c b/server/reds.c
index 5aa7f145..8f835fe2 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -1373,12 +1373,9 @@ void reds_marshall_migrate_data(RedsState *reds, SpiceMarshaller *m)
(see reds_reset_vdp) */
spice_assert(!agent_dev->priv->agent_attached);
red_char_device_migrate_data_marshall_empty(m);
- null_agent_mig_data = spice_marshaller_reserve_space(m,
- sizeof(SpiceMigrateDataMain) -
- sizeof(SpiceMigrateDataCharDevice));
- memset(null_agent_mig_data,
- 0,
- sizeof(SpiceMigrateDataMain) - sizeof(SpiceMigrateDataCharDevice));
+ size_t padding_len = sizeof(SpiceMigrateDataMain) - sizeof(SpiceMigrateDataCharDevice);
+ null_agent_mig_data = spice_marshaller_reserve_space(m, padding_len);
+ memset(null_agent_mig_data, 0, padding_len);
return;
}
More information about the Spice-commits
mailing list