summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-12-08 17:50:01 -0500
committerNick Mathewson <nickm@torproject.org>2016-12-08 17:50:01 -0500
commit39f455468731d4746adb729a67597927beaca4b8 (patch)
treef5317ae92652bed9a1662057cd8229e0a9ed68ce
parentbc68eedd79286420f8dcab5fa4ed83401299c89c (diff)
downloadtor-39f455468731d4746adb729a67597927beaca4b8.tar.gz
tor-39f455468731d4746adb729a67597927beaca4b8.zip
Fix a completely stupid stack-protector warning in test_channels.c
This was breaking the build on debian precise, since it thought that using a 'const int' to dimension an array made that array variable-size, and made us not get protection. Bug not in any released version of Tor. I will insist that this one wasn't my fault. "Variables won't. Constants aren't." -- Osborn's Law
-rw-r--r--src/test/test_channel.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/test/test_channel.c b/src/test/test_channel.c
index f158b1a495..862bd6dfa6 100644
--- a/src/test/test_channel.c
+++ b/src/test/test_channel.c
@@ -1772,7 +1772,7 @@ static void
test_channel_id_map(void *arg)
{
(void)arg;
- const int N_CHAN = 6;
+#define N_CHAN 6
char rsa_id[N_CHAN][DIGEST_LEN];
ed25519_public_key_t *ed_id[N_CHAN];
channel_t *chan[N_CHAN];
@@ -1871,6 +1871,7 @@ test_channel_id_map(void *arg)
free_fake_channel(chan[i]);
tor_free(ed_id[i]);
}
+#undef N_CHAN
}
struct testcase_t channel_tests[] = {