aboutsummaryrefslogtreecommitdiffstats
path: root/src/frame.c
diff options
context:
space:
mode:
authorPaul Eggert2013-08-10 08:42:08 -0700
committerPaul Eggert2013-08-10 08:42:08 -0700
commit9acc107445a159001e56bae04ef2dc2792aa16d7 (patch)
treec96ba4d408258a0addfbe97e602c2aa5148dfcd2 /src/frame.c
parent45fdb48240996f7ad9c8c03f438ecf7f5b925d8e (diff)
downloademacs-9acc107445a159001e56bae04ef2dc2792aa16d7.tar.gz
emacs-9acc107445a159001e56bae04ef2dc2792aa16d7.zip
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.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/frame.c b/src/frame.c
index 853ec441343..9989ef7af13 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -725,7 +725,7 @@ affects all frames on the same terminal device. */)
725 XSETFRAME (frame, f); 725 XSETFRAME (frame, f);
726 726
727 store_in_alist (&parms, Qtty_type, build_string (t->display_info.tty->type)); 727 store_in_alist (&parms, Qtty_type, build_string (t->display_info.tty->type));
728 store_in_alist (&parms, Qtty, 728 store_in_alist (&parms, Qtty,
729 (t->display_info.tty->name 729 (t->display_info.tty->name
730 ? build_string (t->display_info.tty->name) 730 ? build_string (t->display_info.tty->name)
731 : Qnil)); 731 : Qnil));
@@ -4203,8 +4203,7 @@ make_monitor_attribute_list (struct MonitorInfo *monitors,
4203 mi->work.width, mi->work.height); 4203 mi->work.width, mi->work.height);
4204 geometry = list4i (mi->geom.x, mi->geom.y, 4204 geometry = list4i (mi->geom.x, mi->geom.y,
4205 mi->geom.width, mi->geom.height); 4205 mi->geom.width, mi->geom.height);
4206 attributes = Fcons (Fcons (Qsource, 4206 attributes = Fcons (Fcons (Qsource, build_string (source)),
4207 make_string (source, strlen (source))),
4208 attributes); 4207 attributes);
4209 attributes = Fcons (Fcons (Qframes, AREF (monitor_frames, i)), 4208 attributes = Fcons (Fcons (Qframes, AREF (monitor_frames, i)),
4210 attributes); 4209 attributes);