aboutsummaryrefslogtreecommitdiffstats
path: root/src/process.c
diff options
context:
space:
mode:
authorDmitry Antipov2012-06-26 18:41:01 +0400
committerDmitry Antipov2012-06-26 18:41:01 +0400
commit62efea5e881407a178c5c291575facc17dca8a3f (patch)
tree03224f091836b782bea0e86c76d9135d9a5f86bf /src/process.c
parent995a55159dc4b4831e45fe9827a99cadad1bcbd3 (diff)
downloademacs-62efea5e881407a178c5c291575facc17dca8a3f.tar.gz
emacs-62efea5e881407a178c5c291575facc17dca8a3f.zip
* alloc.c (allocate_window): Zero out non-Lisp part of newly
allocated window. (allocate_process): Likewise for new process. (allocate_terminal): Changed to use offsetof. (allocate_frame): Likewise. * frame.c (make_frame): Omit redundant initialization. * window.c (make_parent_window): Use memset. (make_window): Omit redundant initialization. * process.c (make_process): Omit redundant initialization. * terminal.c (create_terminal): Likewise.
Diffstat (limited to 'src/process.c')
-rw-r--r--src/process.c29
1 files changed, 6 insertions, 23 deletions
diff --git a/src/process.c b/src/process.c
index e39710078d2..1508e4b13fc 100644
--- a/src/process.c
+++ b/src/process.c
@@ -625,35 +625,18 @@ make_process (Lisp_Object name)
625 printmax_t i; 625 printmax_t i;
626 626
627 p = allocate_process (); 627 p = allocate_process ();
628 628 /* Initialize Lisp data. Note that allocate_process initializes all
629 p->infd = -1; 629 Lisp data to nil, so do it only for slots which should not be nil. */
630 p->outfd = -1;
631 p->tick = 0;
632 p->update_tick = 0;
633 p->pid = 0;
634 p->pty_flag = 0;
635 p->raw_status_new = 0;
636 p->status = Qrun; 630 p->status = Qrun;
637 p->mark = Fmake_marker (); 631 p->mark = Fmake_marker ();
638 p->kill_without_query = 0;
639 p->write_queue = Qnil;
640 632
641#ifdef ADAPTIVE_READ_BUFFERING 633 /* Initialize non-Lisp data. Note that allocate_process zeroes out all
642 p->adaptive_read_buffering = 0; 634 non-Lisp data, so do it only for slots which should not be zero. */
643 p->read_output_delay = 0; 635 p->infd = -1;
644 p->read_output_skip = 0; 636 p->outfd = -1;
645#endif
646 637
647#ifdef HAVE_GNUTLS 638#ifdef HAVE_GNUTLS
648 p->gnutls_initstage = GNUTLS_STAGE_EMPTY; 639 p->gnutls_initstage = GNUTLS_STAGE_EMPTY;
649 /* Default log level. */
650 p->gnutls_log_level = 0;
651 /* GnuTLS handshakes attempted for this connection. */
652 p->gnutls_handshakes_tried = 0;
653 p->gnutls_p = 0;
654 p->gnutls_state = NULL;
655 p->gnutls_x509_cred = NULL;
656 p->gnutls_anon_cred = NULL;
657#endif 640#endif
658 641
659 /* If name is already in use, modify it until it is unused. */ 642 /* If name is already in use, modify it until it is unused. */