aboutsummaryrefslogtreecommitdiffstats
path: root/src/sysdep.c
diff options
context:
space:
mode:
authorDmitry Antipov2013-08-09 16:25:34 +0400
committerDmitry Antipov2013-08-09 16:25:34 +0400
commit309f24d1ec07646fb1a090ee10fe456e79aea097 (patch)
tree19ba0104e3713ee963113a52f9b38107a3740b2a /src/sysdep.c
parent55902276706ea2db832ad5748a18ab392a0873f1 (diff)
downloademacs-309f24d1ec07646fb1a090ee10fe456e79aea097.tar.gz
emacs-309f24d1ec07646fb1a090ee10fe456e79aea097.zip
Use xstrdup and build_unibyte_string where applicable.
* alloc.c (xstrdup): Tiny cleanup. Add eassert. * xfns.c (x_window): * xrdb.c (x_get_customization_string): * xterm.c (xim_initialize): * w32fns.c (w32_window): Use xstrdup. (w32_display_monitor_attributes_list): * emacs.c (init_cmdargs): * keyboard.c (PUSH_C_STR): * nsfont.m (nsfont_open): * sysdep.c (system_process_attributes): * w32.c (system_process_attributes): * xdisp.c (message1, message1_nolog): Use build_unibyte_string.
Diffstat (limited to 'src/sysdep.c')
-rw-r--r--src/sysdep.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/sysdep.c b/src/sysdep.c
index 11a6f4a76ce..201ba9d104d 100644
--- a/src/sysdep.c
+++ b/src/sysdep.c
@@ -3243,13 +3243,11 @@ system_process_attributes (Lisp_Object pid)
3243 attrs); 3243 attrs);
3244 3244
3245 decoded_cmd = (code_convert_string_norecord 3245 decoded_cmd = (code_convert_string_norecord
3246 (make_unibyte_string (pinfo.pr_fname, 3246 (build_unibyte_string (pinfo.pr_fname),
3247 strlen (pinfo.pr_fname)),
3248 Vlocale_coding_system, 0)); 3247 Vlocale_coding_system, 0));
3249 attrs = Fcons (Fcons (Qcomm, decoded_cmd), attrs); 3248 attrs = Fcons (Fcons (Qcomm, decoded_cmd), attrs);
3250 decoded_cmd = (code_convert_string_norecord 3249 decoded_cmd = (code_convert_string_norecord
3251 (make_unibyte_string (pinfo.pr_psargs, 3250 (build_unibyte_string (pinfo.pr_psargs),
3252 strlen (pinfo.pr_psargs)),
3253 Vlocale_coding_system, 0)); 3251 Vlocale_coding_system, 0));
3254 attrs = Fcons (Fcons (Qargs, decoded_cmd), attrs); 3252 attrs = Fcons (Fcons (Qargs, decoded_cmd), attrs);
3255 } 3253 }
@@ -3319,9 +3317,9 @@ system_process_attributes (Lisp_Object pid)
3319 if (gr) 3317 if (gr)
3320 attrs = Fcons (Fcons (Qgroup, build_string (gr->gr_name)), attrs); 3318 attrs = Fcons (Fcons (Qgroup, build_string (gr->gr_name)), attrs);
3321 3319
3322 decoded_comm = code_convert_string_norecord 3320 decoded_comm = (code_convert_string_norecord
3323 (make_unibyte_string (proc.ki_comm, strlen (proc.ki_comm)), 3321 (build_unibyte_string (proc.ki_comm),
3324 Vlocale_coding_system, 0); 3322 Vlocale_coding_system, 0));
3325 3323
3326 attrs = Fcons (Fcons (Qcomm, decoded_comm), attrs); 3324 attrs = Fcons (Fcons (Qcomm, decoded_comm), attrs);
3327 { 3325 {