aboutsummaryrefslogtreecommitdiff
path: root/net/announce.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/announce.c')
-rw-r--r--net/announce.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/announce.c b/net/announce.c
index 62c6019..9e99044 100644
--- a/net/announce.c
+++ b/net/announce.c
@@ -46,7 +46,7 @@ void qemu_announce_timer_del(AnnounceTimer *timer, bool free_named)
}
qapi_free_strList(timer->params.interfaces);
timer->params.interfaces = NULL;
- if (free_named && timer->params.has_id) {
+ if (free_named && timer->params.id) {
AnnounceTimer *list_timer;
/*
* Sanity check: There should only be one timer on the list with
@@ -157,7 +157,7 @@ static void qemu_announce_self_iter(NICState *nic, void *opaque)
skip = false;
}
- trace_qemu_announce_self_iter(timer->params.has_id ? timer->params.id : "_",
+ trace_qemu_announce_self_iter(timer->params.id ?: "_",
nic->ncs->name,
qemu_ether_ntoa(&nic->conf->macaddr), skip);
@@ -199,9 +199,9 @@ void qemu_announce_self(AnnounceTimer *timer, AnnounceParameters *params)
void qmp_announce_self(AnnounceParameters *params, Error **errp)
{
AnnounceTimer *named_timer;
- if (!params->has_id) {
+
+ if (!params->id) {
params->id = g_strdup("");
- params->has_id = true;
}
named_timer = g_datalist_get_data(&named_timers, params->id);