Skip to content

Commit a690627

Browse files
committed
Simplify checking tz_coord_list.
1 parent 7642f95 commit a690627

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

plugins/color/csd-night-light.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -440,14 +440,14 @@ update_location_from_timezone (CsdNightLight *self)
440440

441441
for (int i = 0; i < G_N_ELEMENTS (tz_coord_list); i++)
442442
{
443-
const TZCoords *coords = &tz_coord_list[i];
444-
if (g_strcmp0 (coords->timezone, id) == 0)
443+
const TZCoords coords = tz_coord_list[i];
444+
if (g_strcmp0 (coords.timezone, id) == 0)
445445
{
446446
g_debug ("Coordinates updated, timezone: %s, lat:%.3f, long:%.3f.",
447-
id, coords->latitude, coords->longitude);
447+
id, coords.latitude, coords.longitude);
448448
g_settings_set_value (self->settings,
449449
"night-light-last-coordinates",
450-
g_variant_new ("(dd)", coords->latitude, coords->longitude));
450+
g_variant_new ("(dd)", coords.latitude, coords.longitude));
451451
break;
452452
}
453453
}

plugins/color/generate-tz-header.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
3030
typedef struct
3131
{
32-
const gchar *timezone;
32+
const char *timezone;
3333
double latitude;
3434
double longitude;
3535
} TZCoords;

0 commit comments

Comments
 (0)