[tor-commits] [tor/master] Always initialise return value in compute_desc_id in rendcommon.c

nickm at torproject.org nickm at torproject.org
Tue Jun 2 19:07:40 UTC 2015


commit 2b73dbf2a4c2fcf42fdd2987b3fa72efdec3a222
Author: teor <teor2345 at gmail.com>
Date:   Wed Jun 3 03:48:46 2015 +1000

    Always initialise return value in compute_desc_id in rendcommon.c
    
    Fix on e6a581f126ba, released in 0.2.7.1-alpha.
---
 changes/bug16115-init-var |    4 ++++
 src/or/rendcommon.c       |    2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/changes/bug16115-init-var b/changes/bug16115-init-var
new file mode 100644
index 0000000..e3e924a
--- /dev/null
+++ b/changes/bug16115-init-var
@@ -0,0 +1,4 @@
+  o Minor fixes (threads, comments):
+    - Always initialise return value in compute_desc_id in rendcommon.c
+      Patch by "teor".
+      Fix on e6a581f126ba, released in 0.2.7.1-alpha.
diff --git a/src/or/rendcommon.c b/src/or/rendcommon.c
index ec4353c..0acca58 100644
--- a/src/or/rendcommon.c
+++ b/src/or/rendcommon.c
@@ -1417,7 +1417,7 @@ rend_data_dup(const rend_data_t *data)
 static int
 compute_desc_id(rend_data_t *rend_data)
 {
-  int ret;
+  int ret = 0;
   unsigned replica;
   time_t now = time(NULL);
 





More information about the tor-commits mailing list