diff options
author | Dmitry Antipov <dmantipov@yandex.ru> | 2012-06-26 18:41:01 +0400 |
---|---|---|
committer | Dmitry Antipov <dmantipov@yandex.ru> | 2012-06-26 18:41:01 +0400 |
commit | 62efea5e881407a178c5c291575facc17dca8a3f (patch) | |
tree | 03224f091836b782bea0e86c76d9135d9a5f86bf /src/process.c | |
parent | 995a55159dc4b4831e45fe9827a99cadad1bcbd3 (diff) | |
download | emacs-62efea5e881407a178c5c291575facc17dca8a3f.tar.gz |
* 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.c | 29 |
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) printmax_t i; p = allocate_process (); - - p->infd = -1; - p->outfd = -1; - p->tick = 0; - p->update_tick = 0; - p->pid = 0; - p->pty_flag = 0; - p->raw_status_new = 0; + /* Initialize Lisp data. Note that allocate_process initializes all + Lisp data to nil, so do it only for slots which should not be nil. */ p->status = Qrun; p->mark = Fmake_marker (); - p->kill_without_query = 0; - p->write_queue = Qnil; -#ifdef ADAPTIVE_READ_BUFFERING - p->adaptive_read_buffering = 0; - p->read_output_delay = 0; - p->read_output_skip = 0; -#endif + /* Initialize non-Lisp data. Note that allocate_process zeroes out all + non-Lisp data, so do it only for slots which should not be zero. */ + p->infd = -1; + p->outfd = -1; #ifdef HAVE_GNUTLS p->gnutls_initstage = GNUTLS_STAGE_EMPTY; - /* Default log level. */ - p->gnutls_log_level = 0; - /* GnuTLS handshakes attempted for this connection. */ - p->gnutls_handshakes_tried = 0; - p->gnutls_p = 0; - p->gnutls_state = NULL; - p->gnutls_x509_cred = NULL; - p->gnutls_anon_cred = NULL; #endif /* If name is already in use, modify it until it is unused. */ |