summaryrefslogtreecommitdiff
path: root/libmate-desktop
diff options
context:
space:
mode:
Diffstat (limited to 'libmate-desktop')
-rw-r--r--libmate-desktop/mate-bg.c8
-rw-r--r--libmate-desktop/mate-rr-config.c2
-rw-r--r--libmate-desktop/mate-rr.c8
3 files changed, 7 insertions, 11 deletions
diff --git a/libmate-desktop/mate-bg.c b/libmate-desktop/mate-bg.c
index 64c8d6a..fd55e4a 100644
--- a/libmate-desktop/mate-bg.c
+++ b/libmate-desktop/mate-bg.c
@@ -3071,7 +3071,7 @@ read_slideshow_file (const char *filename,
g_markup_parse_context_free (context);
if (show) {
- int len;
+ guint num_items;
t = mktime (&show->start_tm);
@@ -3079,14 +3079,14 @@ read_slideshow_file (const char *filename,
dump_bg (show);
- len = g_queue_get_length (show->slides);
+ num_items = g_queue_get_length (show->slides);
/* no slides, that's not a slideshow */
- if (len == 0) {
+ if (num_items == 0) {
slideshow_unref (show);
show = NULL;
/* one slide, there's no transition */
- } else if (len == 1) {
+ } else if (num_items == 1) {
Slide *slide = show->slides->head->data;
slide->duration = show->total_duration = G_MAXUINT;
}
diff --git a/libmate-desktop/mate-rr-config.c b/libmate-desktop/mate-rr-config.c
index d281420..964846c 100644
--- a/libmate-desktop/mate-rr-config.c
+++ b/libmate-desktop/mate-rr-config.c
@@ -1546,7 +1546,7 @@ crtc_assignment_assign (CrtcAssignment *assign,
}
else
{
- CrtcInfo *info = g_new0 (CrtcInfo, 1);
+ info = g_new0 (CrtcInfo, 1);
info->mode = mode;
info->x = x;
diff --git a/libmate-desktop/mate-rr.c b/libmate-desktop/mate-rr.c
index 97859a1..19d25ca 100644
--- a/libmate-desktop/mate-rr.c
+++ b/libmate-desktop/mate-rr.c
@@ -376,9 +376,7 @@ fill_screen_info_from_resources (ScreenInfo *info,
a = g_ptr_array_new ();
for (i = 0; i < resources->ncrtc; ++i)
{
- MateRRCrtc *crtc = crtc_new (info, resources->crtcs[i]);
-
- g_ptr_array_add (a, crtc);
+ g_ptr_array_add (a, crtc_new (info, resources->crtcs[i]));
}
g_ptr_array_add (a, NULL);
info->crtcs = (MateRRCrtc **)g_ptr_array_free (a, FALSE);
@@ -386,9 +384,7 @@ fill_screen_info_from_resources (ScreenInfo *info,
a = g_ptr_array_new ();
for (i = 0; i < resources->noutput; ++i)
{
- MateRROutput *output = output_new (info, resources->outputs[i]);
-
- g_ptr_array_add (a, output);
+ g_ptr_array_add (a, output_new (info, resources->outputs[i]));
}
g_ptr_array_add (a, NULL);
info->outputs = (MateRROutput **)g_ptr_array_free (a, FALSE);