aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2011-04-26 00:35:23 -0700
committerPaul Eggert2011-04-26 00:35:23 -0700
commitc892615246aca066a2b8df322d6d808ded38af6b (patch)
treec80eb8443b60691f49dcde69e4b0ab051c4b6f0b /src
parent8d4c39551793f003936e4d5da9839ab250358da1 (diff)
downloademacs-c892615246aca066a2b8df322d6d808ded38af6b.tar.gz
emacs-c892615246aca066a2b8df322d6d808ded38af6b.zip
* gnutls.c (emacs_gnutls_write): Don't use uninitialized rtnval if nbyte <= 0.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog1
-rw-r--r--src/gnutls.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index aea040263bd..2fa0e5468ea 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -8,6 +8,7 @@
8 (emacs_gnutls_handle_error): Remove unused local. 8 (emacs_gnutls_handle_error): Remove unused local.
9 (Fgnutls_boot): gnutls_certificate_verify_peers2 wants unsigned *. 9 (Fgnutls_boot): gnutls_certificate_verify_peers2 wants unsigned *.
10 Remove unused local. 10 Remove unused local.
11 (emacs_gnutls_write): Don't use uninitialized rtnval if nbyte <= 0.
11 12
12 lisp.h: Fix a problem with aliasing and vector headers. 13 lisp.h: Fix a problem with aliasing and vector headers.
13 GCC 4.6.0 optimizes based on type-based alias analysis. For 14 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
130emacs_gnutls_write (int fildes, struct Lisp_Process *proc, const char *buf, 130emacs_gnutls_write (int fildes, struct Lisp_Process *proc, const char *buf,
131 EMACS_INT nbyte) 131 EMACS_INT nbyte)
132{ 132{
133 ssize_t rtnval; 133 ssize_t rtnval = 0;
134 EMACS_INT bytes_written; 134 EMACS_INT bytes_written;
135 gnutls_session_t state = proc->gnutls_state; 135 gnutls_session_t state = proc->gnutls_state;
136 136