diff options
author | Alexander Gramiak <agrambot@gmail.com> | 2019-04-14 08:41:48 -0600 |
---|---|---|
committer | Alexander Gramiak <agrambot@gmail.com> | 2019-04-14 08:56:10 -0600 |
commit | 890440a44cd5f4f09742f521c7783785d114fffc (patch) | |
tree | ee808cddf0c1ac69dcb6c8d6a4584930a4f7a93f /src/xfns.c | |
parent | 29b36a007ae04839a4c29c62b2b1ee7940a8539a (diff) | |
download | emacs-890440a44cd5f4f09742f521c7783785d114fffc.tar.gz |
Simplify gdk_monitor_get_model string duplication
* src/xfns.c (x-display-monitor-attributes-list): Use dupstring over
explicit if/xstrdup.
* src/frame.c (free_monitors): Remove redundant check for NULL.
Diffstat (limited to 'src/xfns.c')
-rw-r--r-- | src/xfns.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/xfns.c b/src/xfns.c index dd1d8993f5e..e521ed12e40 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -5030,8 +5030,7 @@ Internal use only, use `display-monitor-attributes-list' instead. */) 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 |