[virt-tools-list] [PATCH 1/4] virt-viewer-window: Remove useless tests for priv->window != NULL
Hans de Goede
hdegoede at redhat.com
Mon Mar 5 15:22:07 UTC 2012
priv->window gets set on init and never unset, so there is no need to check
for it.
Signed-off-by: Hans de Goede <hdegoede at redhat.com>
---
src/virt-viewer-window.c | 8 +-------
1 files changed, 1 insertions(+), 7 deletions(-)
diff --git a/src/virt-viewer-window.c b/src/virt-viewer-window.c
index 033229f..604bc97 100644
--- a/src/virt-viewer-window.c
+++ b/src/virt-viewer-window.c
@@ -324,7 +324,7 @@ virt_viewer_window_desktop_resize(VirtViewerDisplay *display G_GNUC_UNUSED,
VirtViewerWindow *self)
{
VirtViewerWindowPrivate *priv = self->priv;
- if (priv->auto_resize && priv->window && !priv->fullscreen)
+ if (priv->auto_resize && !priv->fullscreen)
virt_viewer_window_resize(self);
}
@@ -576,9 +576,6 @@ virt_viewer_window_disable_modifiers(VirtViewerWindow *self)
GSList *accels;
int i;
- if (!priv->window)
- return;
-
if (!priv->accel_enabled)
return;
@@ -615,9 +612,6 @@ virt_viewer_window_enable_modifiers(VirtViewerWindow *self)
GSList *accels;
int i;
- if (!priv->window)
- return;
-
if (priv->accel_enabled)
return;
--
1.7.7.6
More information about the virt-tools-list
mailing list