diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-06-26 11:58:56 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-06-26 11:58:56 +0000 |
commit | c0101989bb0864a3688f57370e712c91c14ab1cd (patch) | |
tree | 6ebabad614d272cd6ec2a0562ae64a5555094808 | |
parent | 3ad9123d92423ebf5639ecb86a8e5dd491dffd38 (diff) | |
download | gnunet-c0101989bb0864a3688f57370e712c91c14ab1cd.tar.gz gnunet-c0101989bb0864a3688f57370e712c91c14ab1cd.zip |
-follow naming and coding style conventions
-rw-r--r-- | src/regex/regex_block_lib.c | 7 | ||||
-rw-r--r-- | src/regex/regex_internal_dht.c | 5 |
2 files changed, 7 insertions, 5 deletions
diff --git a/src/regex/regex_block_lib.c b/src/regex/regex_block_lib.c index b945b9198..3a18a731f 100644 --- a/src/regex/regex_block_lib.c +++ b/src/regex/regex_block_lib.c | |||
@@ -31,7 +31,7 @@ | |||
31 | /** | 31 | /** |
32 | * Struct to keep track of the xquery while iterating all the edges in a block. | 32 | * Struct to keep track of the xquery while iterating all the edges in a block. |
33 | */ | 33 | */ |
34 | struct regex_block_xquery_ctx | 34 | struct CheckEdgeContext |
35 | { | 35 | { |
36 | /** | 36 | /** |
37 | * Xquery: string we are looking for. | 37 | * Xquery: string we are looking for. |
@@ -66,7 +66,7 @@ check_edge (void *cls, | |||
66 | size_t len, | 66 | size_t len, |
67 | const struct GNUNET_HashCode *key) | 67 | const struct GNUNET_HashCode *key) |
68 | { | 68 | { |
69 | struct regex_block_xquery_ctx *ctx = cls; | 69 | struct CheckEdgeContext *ctx = cls; |
70 | 70 | ||
71 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 71 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
72 | "edge %.*s [%u]: %s->%s\n", | 72 | "edge %.*s [%u]: %s->%s\n", |
@@ -98,9 +98,10 @@ REGEX_BLOCK_check (const struct RegexBlock *block, | |||
98 | size_t size, | 98 | size_t size, |
99 | const char *xquery) | 99 | const char *xquery) |
100 | { | 100 | { |
101 | struct CheckEdgeContext ctx; | ||
101 | int res; | 102 | int res; |
102 | struct regex_block_xquery_ctx ctx; | ||
103 | 103 | ||
104 | // FIXME: fails to check the proof! | ||
104 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 105 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
105 | "Checking block with xquery `%s'\n", | 106 | "Checking block with xquery `%s'\n", |
106 | NULL != xquery ? xquery : "NULL"); | 107 | NULL != xquery ? xquery : "NULL"); |
diff --git a/src/regex/regex_internal_dht.c b/src/regex/regex_internal_dht.c index 28ab884eb..bf15b9a96 100644 --- a/src/regex/regex_internal_dht.c +++ b/src/regex/regex_internal_dht.c | |||
@@ -382,7 +382,7 @@ regex_find_path (const struct GNUNET_HashCode *key, | |||
382 | */ | 382 | */ |
383 | static void | 383 | static void |
384 | dht_get_string_handler (void *cls, struct GNUNET_TIME_Absolute exp, | 384 | dht_get_string_handler (void *cls, struct GNUNET_TIME_Absolute exp, |
385 | const struct GNUNET_HashCode * key, | 385 | const struct GNUNET_HashCode *key, |
386 | const struct GNUNET_PeerIdentity *get_path, | 386 | const struct GNUNET_PeerIdentity *get_path, |
387 | unsigned int get_path_length, | 387 | unsigned int get_path_length, |
388 | const struct GNUNET_PeerIdentity *put_path, | 388 | const struct GNUNET_PeerIdentity *put_path, |
@@ -398,7 +398,8 @@ dht_get_string_handler (void *cls, struct GNUNET_TIME_Absolute exp, | |||
398 | char *datastore; | 398 | char *datastore; |
399 | 399 | ||
400 | #if DEBUG_DHT | 400 | #if DEBUG_DHT |
401 | if (NULL != put_path && 0 != put_path_length) | 401 | if ( (NULL != put_path) && |
402 | (0 != put_path_length) ) | ||
402 | { | 403 | { |
403 | datastore = GNUNET_strdup (GNUNET_i2s (&put_path[put_path_length - 1])); | 404 | datastore = GNUNET_strdup (GNUNET_i2s (&put_path[put_path_length - 1])); |
404 | } | 405 | } |