diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2013-08-10 08:42:08 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2013-08-10 08:42:08 -0700 |
commit | 9acc107445a159001e56bae04ef2dc2792aa16d7 (patch) | |
tree | c96ba4d408258a0addfbe97e602c2aa5148dfcd2 /src/frame.c | |
parent | 45fdb48240996f7ad9c8c03f438ecf7f5b925d8e (diff) |
Minor string-length refactoring.
* alloc.c (xstrdup): Use memcpy, not strcpy, since the length's known.
* frame.c (make_monitor_attribute_list):
Prefer build_string to strlen + make_string.
Diffstat (limited to 'src/frame.c')
-rw-r--r-- | src/frame.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/frame.c b/src/frame.c index 853ec44134..9989ef7af1 100644 --- a/src/frame.c +++ b/src/frame.c @@ -725,7 +725,7 @@ affects all frames on the same terminal device. */) XSETFRAME (frame, f); store_in_alist (&parms, Qtty_type, build_string (t->display_info.tty->type)); - store_in_alist (&parms, Qtty, + store_in_alist (&parms, Qtty, (t->display_info.tty->name ? build_string (t->display_info.tty->name) : Qnil)); @@ -4203,8 +4203,7 @@ make_monitor_attribute_list (struct MonitorInfo *monitors, mi->work.width, mi->work.height); geometry = list4i (mi->geom.x, mi->geom.y, mi->geom.width, mi->geom.height); - attributes = Fcons (Fcons (Qsource, - make_string (source, strlen (source))), + attributes = Fcons (Fcons (Qsource, build_string (source)), attributes); attributes = Fcons (Fcons (Qframes, AREF (monitor_frames, i)), attributes); |