]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Fix warning when implicitly casting strlen(microdesc) to int
authorNick Mathewson <nickm@torproject.org>
Thu, 6 Sep 2012 00:49:25 +0000 (20:49 -0400)
committerNick Mathewson <nickm@torproject.org>
Thu, 6 Sep 2012 00:49:25 +0000 (20:49 -0400)
Harmless unless we somehow generate a microdesc of more than INT_MAX
bytes.

changes/ssize_t_warning [new file with mode: 0644]
src/or/dirvote.c

diff --git a/changes/ssize_t_warning b/changes/ssize_t_warning
new file mode 100644 (file)
index 0000000..01609cc
--- /dev/null
@@ -0,0 +1,4 @@
+  o Minor build fixes:
+    - Fix a harmless (in this case) build warning for implicitly
+      converting a strlen() to an int. Bugfix on 0.2.4.1-alpha.
+
index 8e85b2bccae61f9744c1dfdb981c111525fb0d0b..ea85636b3b5438a8c1460bcb9076dc85f751e5f9 100644 (file)
@@ -3606,7 +3606,7 @@ dirvote_format_microdesc_vote_line(char *out_buf, size_t out_buf_len,
                                    int consensus_method_low,
                                    int consensus_method_high)
 {
-  int ret = -1;
+  ssize_t ret = -1;
   char d64[BASE64_DIGEST256_LEN+1];
   char *microdesc_consensus_methods =
     make_consensus_method_list(consensus_method_low,