diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-10-26 14:57:24 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-10-26 14:57:24 +0000 |
commit | 87b7d2bc3d9cc8c4da313e5dc60fa497d65eb0e2 (patch) | |
tree | 83bc7d72ac31fff436525d75d3ddb7b59ba04a7b /src/tun/test_regex.c | |
parent | 0c9ca79b2eb820c3266e9117f3ba9179cbdc2ff1 (diff) | |
download | gnunet-87b7d2bc3d9cc8c4da313e5dc60fa497d65eb0e2.tar.gz gnunet-87b7d2bc3d9cc8c4da313e5dc60fa497d65eb0e2.zip |
-faster port range generation, O(n) instead of O(n^2)
Diffstat (limited to 'src/tun/test_regex.c')
-rw-r--r-- | src/tun/test_regex.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/tun/test_regex.c b/src/tun/test_regex.c index 341d8b9a0..3f0f898a9 100644 --- a/src/tun/test_regex.c +++ b/src/tun/test_regex.c | |||
@@ -121,12 +121,17 @@ test_policy6toregex (const char *policy, | |||
121 | int | 121 | int |
122 | main (int argc, char *argv[]) | 122 | main (int argc, char *argv[]) |
123 | { | 123 | { |
124 | GNUNET_log_setup ("test-regex", "WARNING", NULL); | ||
125 | |||
126 | int error; | 124 | int error; |
125 | char *r; | ||
127 | 126 | ||
127 | GNUNET_log_setup ("test-regex", "WARNING", NULL); | ||
128 | error = 0; | 128 | error = 0; |
129 | 129 | ||
130 | /* this is just a performance test ... */ | ||
131 | r = GNUNET_TUN_ipv4policy2regex ("1.2.3.4/16:!25;"); | ||
132 | GNUNET_break (NULL != r); | ||
133 | GNUNET_free (r); | ||
134 | |||
130 | error += | 135 | error += |
131 | test_iptoregex ("192.1.2.3", 2086, | 136 | test_iptoregex ("192.1.2.3", 2086, |
132 | "4-0826-C0010203", | 137 | "4-0826-C0010203", |