aboutsummaryrefslogtreecommitdiff
path: root/src/regex
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2018-01-06 16:37:32 +0100
committerChristian Grothoff <christian@grothoff.org>2018-01-06 16:37:32 +0100
commit6ddfa55804cca3706e4f9fe803a76b7bc5310d47 (patch)
tree74680ea76c9ffa05ce8be2b837df97e199e61586 /src/regex
parentd3e5196f514ff1f76c137fa9db771a32765681f2 (diff)
downloadgnunet-6ddfa55804cca3706e4f9fe803a76b7bc5310d47.tar.gz
gnunet-6ddfa55804cca3706e4f9fe803a76b7bc5310d47.zip
fix indentation and use after free in tcp plugin
Diffstat (limited to 'src/regex')
-rw-r--r--src/regex/regex_test_lib.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/regex/regex_test_lib.c b/src/regex/regex_test_lib.c
index 4e388a70b..814380246 100644
--- a/src/regex/regex_test_lib.c
+++ b/src/regex/regex_test_lib.c
@@ -99,8 +99,7 @@ c2i (char c, int size)
99static void 99static void
100space (int n) 100space (int n)
101{ 101{
102 int i; 102 for (int i = 0; i < n; i++)
103 for (i = 0; i < n; i++)
104 fprintf (stderr, "| "); 103 fprintf (stderr, "| ");
105} 104}
106 105
@@ -114,8 +113,7 @@ space (int n)
114static void 113static void
115debugctx (struct RegexCombineCtx *ctx, int level) 114debugctx (struct RegexCombineCtx *ctx, int level)
116{ 115{
117 return; 116#if DEBUG_REGEX
118 unsigned int i;
119 if (NULL != ctx->s) 117 if (NULL != ctx->s)
120 { 118 {
121 space (level - 1); 119 space (level - 1);
@@ -123,7 +121,7 @@ debugctx (struct RegexCombineCtx *ctx, int level)
123 } 121 }
124 else 122 else
125 fprintf (stderr, "ROOT (base %u)\n", ctx->size); 123 fprintf (stderr, "ROOT (base %u)\n", ctx->size);
126 for (i = 0; i < ctx->size; i++) 124 for (unsigned int i = 0; i < ctx->size; i++)
127 { 125 {
128 if (NULL != ctx->children[i]) 126 if (NULL != ctx->children[i])
129 { 127 {
@@ -132,6 +130,7 @@ debugctx (struct RegexCombineCtx *ctx, int level)
132 } 130 }
133 } 131 }
134 fflush(stderr); 132 fflush(stderr);
133#endif
135} 134}
136 135
137 136
@@ -142,7 +141,8 @@ debugctx (struct RegexCombineCtx *ctx, int level)
142 * @param regex Regex to add. 141 * @param regex Regex to add.
143 */ 142 */
144static void 143static void
145regex_add (struct RegexCombineCtx *ctx, const char *regex); 144regex_add (struct RegexCombineCtx *ctx,
145 const char *regex);
146 146
147 147
148/** 148/**