diff options
author | Christophe Fergeau <cfergeau@redhat.com> | 2014-06-13 16:00:33 +0200 |
---|---|---|
committer | Christophe Fergeau <cfergeau@redhat.com> | 2014-06-26 21:22:18 +0200 |
commit | 14f30419303bbcadbad38c43263d6507c71a2a91 (patch) | |
tree | 2694ffdcdd866c2c7ad6a753903ea8116c88681e | |
parent | eaaa4f5106a9707e4b9a9cd7b52accde3459333d (diff) | |
download | virt-viewer-14f30419303bbcadbad38c43263d6507c71a2a91.tar.gz virt-viewer-14f30419303bbcadbad38c43263d6507c71a2a91.tar.xz virt-viewer-14f30419303bbcadbad38c43263d6507c71a2a91.zip |
Don't use C99 for loops
Declaring a local variable as part as a for loop
such as 'for (unsigned int i; i < N; i++)' is a C99 specific feature.
Running configure with --enable-compile-warnings=minimal does not add
-std=c99 to the compile flags, so it's better if the codebase does not
require C99 support from the compiler.
-rw-r--r-- | src/virt-viewer-session.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/virt-viewer-session.c b/src/virt-viewer-session.c index 20d5fb1..b600481 100644 --- a/src/virt-viewer-session.c +++ b/src/virt-viewer-session.c @@ -395,13 +395,14 @@ virt_viewer_session_on_monitor_geometry_changed(VirtViewerSession* self, gboolean all_fullscreen = TRUE; guint nmonitors = 0; GdkRectangle *monitors = NULL; + GList *l; klass = VIRT_VIEWER_SESSION_GET_CLASS(self); if (!klass->apply_monitor_geometry) return; /* find highest monitor ID so we can create the sparse array */ - for (GList *l = self->priv->displays; l; l = l->next) { + for (l = self->priv->displays; l; l = l->next) { VirtViewerDisplay *d = VIRT_VIEWER_DISPLAY(l->data); guint nth = 0; g_object_get(d, "nth-display", &nth, NULL); @@ -410,7 +411,7 @@ virt_viewer_session_on_monitor_geometry_changed(VirtViewerSession* self, } monitors = g_new0(GdkRectangle, nmonitors); - for (GList *l = self->priv->displays; l; l = l->next) { + for (l = self->priv->displays; l; l = l->next) { VirtViewerDisplay *d = VIRT_VIEWER_DISPLAY(l->data); guint nth = 0; GdkRectangle *rect = NULL; |