[tor-commits] [tor/master] Return success when get_total_system_memory() succeeds.

nickm at torproject.org nickm at torproject.org
Thu May 8 04:32:47 UTC 2014


commit a32d7e1910176deef62583cef5d1195257bf3e17
Author: Nick Mathewson <nickm at torproject.org>
Date:   Thu May 8 00:32:22 2014 -0400

    Return success when get_total_system_memory() succeeds.
    
    Fixes bug 11805; bugfix on 0.2.5.4-alpha.
---
 changes/bug11805    |    5 +++++
 src/common/compat.c |    2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/changes/bug11805 b/changes/bug11805
new file mode 100644
index 0000000..02a5538
--- /dev/null
+++ b/changes/bug11805
@@ -0,0 +1,5 @@
+  o Minor bugfixes:
+    - Correctly detect the total available system memory. We tried to do this
+      in 0.2.5.4-alpha, but the code was set up to always return an error
+      value, even on success.
+      Fixes bug 11805; bugfix on 0.2.5.4-alpha. 
diff --git a/src/common/compat.c b/src/common/compat.c
index 974f697..7a444df 100644
--- a/src/common/compat.c
+++ b/src/common/compat.c
@@ -3453,6 +3453,6 @@ get_total_system_memory(size_t *mem_out)
 
   *mem_out = mem_cached = (size_t) m;
 
-  return -1;
+  return 0;
 }
 



More information about the tor-commits mailing list