]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Fix a very stupid coverity complaint (CID 416).
authorNick Mathewson <nickm@torproject.org>
Tue, 27 Oct 2009 02:03:44 +0000 (22:03 -0400)
committerNick Mathewson <nickm@torproject.org>
Tue, 27 Oct 2009 02:40:41 +0000 (22:40 -0400)
In its zeal to keep me from saying memset(x, '0', sizeof(x)), Coverity
disallows memset(x, 48, sizeof(x)).  Fine.  I'll choose a different
magic number, see if I care!

src/test/test_dir.c

index ca55c115acdac61a19212fcf6d497b6c074a0494..b7ee4032991d900b7a0d0193b5cbef22afd42e31 100644 (file)
@@ -837,7 +837,7 @@ test_dir_v3_networkstatus(void)
   rs->published_on = now-1000;
   strlcpy(rs->nickname, "router4", sizeof(rs->nickname));
   memset(rs->identity_digest, 34, DIGEST_LEN);
-  memset(rs->descriptor_digest, 48, DIGEST_LEN);
+  memset(rs->descriptor_digest, 47, DIGEST_LEN);
   rs->addr = 0xC0000203;
   rs->or_port = 500;
   rs->dir_port = 1999;