]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Fix dumb bug in unittests.
authorNick Mathewson <nickm@torproject.org>
Sat, 22 Jan 2005 00:42:40 +0000 (00:42 +0000)
committerNick Mathewson <nickm@torproject.org>
Sat, 22 Jan 2005 00:42:40 +0000 (00:42 +0000)
svn:r3409

src/or/test.c

index 6fad24af7a1392fe1b2da5447f22ef94a4a1f38c..c6a3b88e80ef09c575f352359ce8c615bf3a2b94 100644 (file)
@@ -808,7 +808,7 @@ test_gzip(void)
                                    GZIP_METHOD));
     test_assert(buf2);
     test_assert(!memcmp(buf2, "\037\213", 2)); /* Gzip magic. */
-    test_eq(detect_compression_method(buf2, strlen(buf1)), GZIP_METHOD);
+    test_eq(detect_compression_method(buf2, len1), GZIP_METHOD);
 
     test_assert(!tor_gzip_uncompress(&buf3, &len2, buf2, len1, GZIP_METHOD));
     test_assert(buf3);
@@ -822,7 +822,7 @@ test_gzip(void)
                                  ZLIB_METHOD));
   test_assert(buf2);
   test_assert(!memcmp(buf2, "\x78\xDA", 2)); /* deflate magic. */
-  test_eq(detect_compression_method(buf2, strlen(buf1)), ZLIB_METHOD);
+  test_eq(detect_compression_method(buf2, len1), ZLIB_METHOD);
 
   test_assert(!tor_gzip_uncompress(&buf3, &len2, buf2, len1, ZLIB_METHOD));
   test_assert(buf3);