aboutsummaryrefslogtreecommitdiff
path: root/src/util/test_common_logging_runtime_loglevels.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-09-26 10:54:37 +0000
committerChristian Grothoff <christian@grothoff.org>2013-09-26 10:54:37 +0000
commit9644bcee56055bbf5e1d90c1d6963d1ce7f818cc (patch)
tree813377c7cceff41cf92a57f869d095afc8084ae3 /src/util/test_common_logging_runtime_loglevels.c
parent7627b7c93947204620a2995f3fed2aca3c668a16 (diff)
downloadgnunet-9644bcee56055bbf5e1d90c1d6963d1ce7f818cc.tar.gz
gnunet-9644bcee56055bbf5e1d90c1d6963d1ce7f818cc.zip
-minor cleanup
Diffstat (limited to 'src/util/test_common_logging_runtime_loglevels.c')
-rw-r--r--src/util/test_common_logging_runtime_loglevels.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/src/util/test_common_logging_runtime_loglevels.c b/src/util/test_common_logging_runtime_loglevels.c
index 58b722b11..37d5b2294 100644
--- a/src/util/test_common_logging_runtime_loglevels.c
+++ b/src/util/test_common_logging_runtime_loglevels.c
@@ -33,6 +33,7 @@
33#define VERBOSE GNUNET_NO 33#define VERBOSE GNUNET_NO
34 34
35static int ok; 35static int ok;
36
36static int phase = 0; 37static int phase = 0;
37 38
38static struct GNUNET_OS_Process *proc; 39static struct GNUNET_OS_Process *proc;
@@ -47,6 +48,7 @@ static GNUNET_SCHEDULER_TaskIdentifier read_task;
47static void 48static void
48runone (void); 49runone (void);
49 50
51
50static void 52static void
51end_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 53end_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
52{ 54{
@@ -82,10 +84,12 @@ end_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
82 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "failing\n"); 84 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "failing\n");
83} 85}
84 86
87
85static char * 88static char *
86read_output_line (int phase_from1, int phase_to1, int phase_from2, 89read_output_line (int phase_from1, int phase_to1, int phase_from2,
87 int phase_to2, char c, char *expect_level, 90 int phase_to2, char c, const char *expect_level,
88 long delay_morethan, long delay_lessthan, int phase, char *p, 91 long delay_morethan, long delay_lessthan, int phase,
92 const char *p,
89 int *len, long *delay, char level[8]) 93 int *len, long *delay, char level[8])
90{ 94{
91 char *r = p; 95 char *r = p;
@@ -161,9 +165,12 @@ read_output_line (int phase_from1, int phase_to1, int phase_from2,
161 return &r[i]; 165 return &r[i];
162} 166}
163 167
164char buf[20 * 16]; 168static char buf[20 * 16];
165char *buf_ptr; 169
166int bytes; 170static char *buf_ptr;
171
172static int bytes;
173
167 174
168static void 175static void
169read_call (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 176read_call (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
@@ -274,6 +281,7 @@ read_call (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
274 GNUNET_SCHEDULER_add_now (&end_task, NULL); 281 GNUNET_SCHEDULER_add_now (&end_task, NULL);
275} 282}
276 283
284
277static void 285static void
278runone () 286runone ()
279{ 287{
@@ -356,6 +364,7 @@ runone ()
356 (void*) stdout_read_handle); 364 (void*) stdout_read_handle);
357} 365}
358 366
367
359static void 368static void
360task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 369task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
361{ 370{