aboutsummaryrefslogtreecommitdiffstats
path: root/src/process.c
diff options
context:
space:
mode:
authorDmitry Antipov2012-07-05 10:32:41 +0400
committerDmitry Antipov2012-07-05 10:32:41 +0400
commit23f86fce48e1cc8118f0ea5cce49d1acfd4364c4 (patch)
tree837ae05f1ad4ad92936f804d580d95751779befe /src/process.c
parent0497dc44b44f148425ff76c4cb7ef0d2ead9750b (diff)
downloademacs-23f86fce48e1cc8118f0ea5cce49d1acfd4364c4.tar.gz
emacs-23f86fce48e1cc8118f0ea5cce49d1acfd4364c4.zip
Cleanup xmalloc.
* admin/coccinelle/xzalloc.cocci: Semantic patch to convert calls to xmalloc with following memset to xzalloc. * src/lisp.h (xzalloc): New prototype. Omit needless casts. * src/alloc.c (xzalloc): New function. Omit needless casts. * src/charset.c: Omit needless casts. Convert all calls to malloc with following memset to xzalloc. * src/dispnew.c: Likewise. * src/fringe.c: Likewise. * src/image.c: Likewise. * src/sound.c: Likewise. * src/term.c: Likewise. * src/w32fns.c: Likewise. * src/w32font.c: Likewise. * src/w32term.c: Likewise. * src/xfaces.c: Likewise. * src/xfns.c: Likewise. * src/xterm.c: Likewise. * src/atimer.c: Omit needless casts. * src/buffer.c: Likewise. * src/callproc.c: Likewise. * src/ccl.c: Likewise. * src/coding.c: Likewise. * src/composite.c: Likewise. * src/doc.c: Likewise. * src/doprnt.c: Likewise. * src/editfns.c: Likewise. * src/emacs.c: Likewise. * src/eval.c: Likewise. * src/filelock.c: Likewise. * src/fns.c: Likewise. * src/gtkutil.c: Likewise. * src/keyboard.c: Likewise. * src/lisp.h: Likewise. * src/lread.c: Likewise. * src/minibuf.c: Likewise. * src/msdos.c: Likewise. * src/print.c: Likewise. * src/process.c: Likewise. * src/region-cache.c: Likewise. * src/search.c: Likewise. * src/sysdep.c: Likewise. * src/termcap.c: Likewise. * src/terminal.c: Likewise. * src/tparam.c: Likewise. * src/w16select.c: Likewise. * src/w32.c: Likewise. * src/w32reg.c: Likewise. * src/w32select.c: Likewise. * src/w32uniscribe.c: Likewise. * src/widget.c: Likewise. * src/xdisp.c: Likewise. * src/xmenu.c: Likewise. * src/xrdb.c: Likewise. * src/xselect.c: Likewise.
Diffstat (limited to 'src/process.c')
-rw-r--r--src/process.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/process.c b/src/process.c
index a251e08a4db..3f329872c76 100644
--- a/src/process.c
+++ b/src/process.c
@@ -3316,7 +3316,7 @@ usage: (make-network-process &rest ARGS) */)
3316 { 3316 {
3317 if (datagram_address[s].sa) 3317 if (datagram_address[s].sa)
3318 abort (); 3318 abort ();
3319 datagram_address[s].sa = (struct sockaddr *) xmalloc (lres->ai_addrlen); 3319 datagram_address[s].sa = xmalloc (lres->ai_addrlen);
3320 datagram_address[s].len = lres->ai_addrlen; 3320 datagram_address[s].len = lres->ai_addrlen;
3321 if (is_server) 3321 if (is_server)
3322 { 3322 {
@@ -6286,7 +6286,7 @@ process has been transmitted to the serial port. */)
6286 6286
6287 if (!proc_encode_coding_system[new_outfd]) 6287 if (!proc_encode_coding_system[new_outfd])
6288 proc_encode_coding_system[new_outfd] 6288 proc_encode_coding_system[new_outfd]
6289 = (struct coding_system *) xmalloc (sizeof (struct coding_system)); 6289 = xmalloc (sizeof (struct coding_system));
6290 memcpy (proc_encode_coding_system[new_outfd], 6290 memcpy (proc_encode_coding_system[new_outfd],
6291 proc_encode_coding_system[old_outfd], 6291 proc_encode_coding_system[old_outfd],
6292 sizeof (struct coding_system)); 6292 sizeof (struct coding_system));
@@ -7084,7 +7084,7 @@ setup_process_coding_systems (Lisp_Object process)
7084 7084
7085 if (!proc_decode_coding_system[inch]) 7085 if (!proc_decode_coding_system[inch])
7086 proc_decode_coding_system[inch] 7086 proc_decode_coding_system[inch]
7087 = (struct coding_system *) xmalloc (sizeof (struct coding_system)); 7087 = xmalloc (sizeof (struct coding_system));
7088 coding_system = p->decode_coding_system; 7088 coding_system = p->decode_coding_system;
7089 if (! NILP (p->filter)) 7089 if (! NILP (p->filter))
7090 ; 7090 ;
@@ -7097,7 +7097,7 @@ setup_process_coding_systems (Lisp_Object process)
7097 7097
7098 if (!proc_encode_coding_system[outch]) 7098 if (!proc_encode_coding_system[outch])
7099 proc_encode_coding_system[outch] 7099 proc_encode_coding_system[outch]
7100 = (struct coding_system *) xmalloc (sizeof (struct coding_system)); 7100 = xmalloc (sizeof (struct coding_system));
7101 setup_coding_system (p->encode_coding_system, 7101 setup_coding_system (p->encode_coding_system,
7102 proc_encode_coding_system[outch]); 7102 proc_encode_coding_system[outch]);
7103#endif 7103#endif