* src/xfns.c (x-display-monitor-attributes-list): Use dupstring over
explicit if/xstrdup.
* src/frame.c (free_monitors): Remove redundant check for NULL.
{
int i;
for (i = 0; i < n_monitors; ++i)
- if (monitors[i].name)
- xfree (monitors[i].name);
+ xfree (monitors[i].name);
xfree (monitors);
}
# endif
mi->mm_height = height_mm;
#if GTK_CHECK_VERSION (3, 22, 0)
- if (gdk_monitor_get_model (monitor))
- mi->name = xstrdup (gdk_monitor_get_model (monitor));
+ dupstring (&mi->name, (gdk_monitor_get_model (monitor)));
#elif GTK_CHECK_VERSION (2, 14, 0)
mi->name = gdk_screen_get_monitor_plug_name (gscreen, i);
#endif