From c892615246aca066a2b8df322d6d808ded38af6b Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 26 Apr 2011 00:35:23 -0700 Subject: [PATCH] * gnutls.c (emacs_gnutls_write): Don't use uninitialized rtnval if nbyte <= 0. --- src/ChangeLog | 1 + src/gnutls.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index aea040263bd..2fa0e5468ea 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -8,6 +8,7 @@ (emacs_gnutls_handle_error): Remove unused local. (Fgnutls_boot): gnutls_certificate_verify_peers2 wants unsigned *. Remove unused local. + (emacs_gnutls_write): Don't use uninitialized rtnval if nbyte <= 0. lisp.h: Fix a problem with aliasing and vector headers. GCC 4.6.0 optimizes based on type-based alias analysis. For diff --git a/src/gnutls.c b/src/gnutls.c index c0e078151a2..1abccbbfbee 100644 --- a/src/gnutls.c +++ b/src/gnutls.c @@ -130,7 +130,7 @@ EMACS_INT emacs_gnutls_write (int fildes, struct Lisp_Process *proc, const char *buf, EMACS_INT nbyte) { - ssize_t rtnval; + ssize_t rtnval = 0; EMACS_INT bytes_written; gnutls_session_t state = proc->gnutls_state; -- 2.39.2