]> git.eshelyaron.com Git - emacs.git/commitdiff
* gnutls.c (emacs_gnutls_write): Don't use uninitialized rtnval if nbyte <= 0.
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 26 Apr 2011 07:35:23 +0000 (00:35 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 26 Apr 2011 07:35:23 +0000 (00:35 -0700)
src/ChangeLog
src/gnutls.c

index aea040263bdec9bce384e9b19476edeb40ba9410..2fa0e5468eab30461fcdff7d24ddc27a97a7dad4 100644 (file)
@@ -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
index c0e078151a23fd30ff3f4c50bb0857831c0c6b9d..1abccbbfbee27ecfd5f97ed6a73a93e12c415ca1 100644 (file)
@@ -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;