summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorteor <teor2345@gmail.com>2015-06-03 03:48:46 +1000
committerteor <teor2345@gmail.com>2015-06-03 04:19:05 +1000
commit2b73dbf2a4c2fcf42fdd2987b3fa72efdec3a222 (patch)
tree00e6dfe6c07f63a5603ab4ee62f0ffaff67a653e
parentb3f79da0d589157948262d4a5c81969da789c0c4 (diff)
downloadtor-2b73dbf2a4c2fcf42fdd2987b3fa72efdec3a222.tar.gz
tor-2b73dbf2a4c2fcf42fdd2987b3fa72efdec3a222.zip
Always initialise return value in compute_desc_id in rendcommon.c
Fix on e6a581f126ba, released in 0.2.7.1-alpha.
-rw-r--r--changes/bug16115-init-var4
-rw-r--r--src/or/rendcommon.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/changes/bug16115-init-var b/changes/bug16115-init-var
new file mode 100644
index 0000000000..e3e924a3e3
--- /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 ec4353c409..0acca58713 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);