]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Fix a couple of "unused assigned value" warnings in parse_config tests
authorNick Mathewson <nickm@torproject.org>
Fri, 30 Mar 2012 14:26:34 +0000 (10:26 -0400)
committerNick Mathewson <nickm@torproject.org>
Fri, 30 Mar 2012 14:26:34 +0000 (10:26 -0400)
Coverity doesn't like the fact that we were storing the value of
parse_config_line_from_str() but not checking it in a couple of
cases.

Fixes CID 505 and 506.

src/test/test_util.c

index 0f9d1a769c2d6c21758316a19fd0a1f2946fc210..88f00e071be0452cd5f5f89c1c88a6b7dc125bc9 100644 (file)
@@ -388,6 +388,8 @@ test_util_config_line_comment_character(void)
   test_streq(v, "some value");
   tor_free(k); tor_free(v);
 
+  test_streq(str, "k3 /home/user/myTorNetwork#2\n");
+
 #if 0
   str = parse_config_line_from_str(str, &k, &v);
   test_streq(k, "k3");
@@ -499,6 +501,7 @@ test_util_config_line_escaped_content(void)
   test_streq(k, "Mix");
   test_streq(v, "This is a \"star\":\t'*'\nAnd second line");
   tor_free(k); tor_free(v);
+  test_streq(str, "");
 
   str = buf2;