diff options
-rw-r--r-- | hw/display/qxl.c | 2 | ||||
-rw-r--r-- | tcg/optimize.c | 9 | ||||
-rw-r--r-- | ui/spice-display.c | 2 | ||||
-rw-r--r-- | ui/vnc-tls.c | 6 | ||||
-rw-r--r-- | ui/vnc.c | 18 |
5 files changed, 15 insertions, 22 deletions
diff --git a/hw/display/qxl.c b/hw/display/qxl.c index 736fd3c4e2..d43aa49eb8 100644 --- a/hw/display/qxl.c +++ b/hw/display/qxl.c @@ -710,7 +710,7 @@ static void interface_release_resource(QXLInstance *sin, if (ext.group_id == MEMSLOT_GROUP_HOST) { /* host group -> vga mode update request */ - QXLCommandExt *cmdext = (void *)(ext.info->id); + QXLCommandExt *cmdext = (void *)(intptr_t)(ext.info->id); SimpleSpiceUpdate *update; g_assert(cmdext->cmd.type == QXL_CMD_DRAW); update = container_of(cmdext, SimpleSpiceUpdate, ext); diff --git a/tcg/optimize.c b/tcg/optimize.c index 16cebbe16d..34ae3c2857 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@ -911,12 +911,11 @@ static TCGArg *tcg_constant_folding(TCGContext *s, uint16_t *tcg_opc_ptr, break; } - /* 32-bit ops (non 64-bit ops and non load/store ops) generate - 32-bit results. For the result is zero test below, we can - ignore high bits, but for further optimizations we need to - record that the high bits contain garbage. */ + /* 32-bit ops generate 32-bit results. For the result is zero test + below, we can ignore high bits, but for further optimizations we + need to record that the high bits contain garbage. */ partmask = mask; - if (!(def->flags & (TCG_OPF_CALL_CLOBBER | TCG_OPF_64BIT))) { + if (!(def->flags & TCG_OPF_64BIT)) { mask |= ~(tcg_target_ulong)0xffffffffu; partmask &= 0xffffffffu; affected &= 0xffffffffu; diff --git a/ui/spice-display.c b/ui/spice-display.c index 03040b157f..66e25788ce 100644 --- a/ui/spice-display.c +++ b/ui/spice-display.c @@ -534,7 +534,7 @@ static void interface_release_resource(QXLInstance *sin, QXLCommandExt *ext; dprint(2, "%s/%d:\n", __func__, ssd->qxl.id); - ext = (void *)(rext.info->id); + ext = (void *)(intptr_t)(rext.info->id); switch (ext->cmd.type) { case QXL_CMD_DRAW: update = container_of(ext, SimpleSpiceUpdate, ext); diff --git a/ui/vnc-tls.c b/ui/vnc-tls.c index 50275de64f..63923265fd 100644 --- a/ui/vnc-tls.c +++ b/ui/vnc-tls.c @@ -443,10 +443,8 @@ static int vnc_set_x509_credential(VncDisplay *vd, { struct stat sb; - if (*cred) { - g_free(*cred); - *cred = NULL; - } + g_free(*cred); + *cred = NULL; *cred = g_malloc(strlen(certdir) + strlen(filename) + 2); @@ -935,6 +935,9 @@ static int vnc_update_client(VncState *vs, int has_dirty, bool sync) } vnc_job_push(job); + if (sync) { + vnc_jobs_join(vs); + } vs->force_update = 0; return n; } @@ -2972,10 +2975,8 @@ static void vnc_display_close(DisplayState *ds) if (!vs) return; - if (vs->display) { - g_free(vs->display); - vs->display = NULL; - } + g_free(vs->display); + vs->display = NULL; if (vs->lsock != -1) { qemu_set_fd_handler2(vs->lsock, NULL, NULL, NULL, NULL); close(vs->lsock); @@ -3010,13 +3011,8 @@ int vnc_display_password(DisplayState *ds, const char *password) return -EINVAL; } - if (vs->password) { - g_free(vs->password); - vs->password = NULL; - } - if (password) { - vs->password = g_strdup(password); - } + g_free(vs->password); + vs->password = g_strdup(password); return 0; } |