aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBart Polot <bart@net.in.tum.de>2012-06-27 13:48:42 +0000
committerBart Polot <bart@net.in.tum.de>2012-06-27 13:48:42 +0000
commit8cc2bc95891cb47263671f0fdf6c2fa0e63999f6 (patch)
tree83cedfe4137106aa8d7982d1ab43ddd1a98f31ff /src
parentf7b9c05bd2b9b308ef3b1ce67e4840c072364595 (diff)
downloadgnunet-8cc2bc95891cb47263671f0fdf6c2fa0e63999f6.tar.gz
gnunet-8cc2bc95891cb47263671f0fdf6c2fa0e63999f6.zip
- Reorder iterator arguments
Diffstat (limited to 'src')
-rw-r--r--src/mesh/mesh_block_lib.c12
-rw-r--r--src/mesh/mesh_block_lib.h8
2 files changed, 10 insertions, 10 deletions
diff --git a/src/mesh/mesh_block_lib.c b/src/mesh/mesh_block_lib.c
index b9c187e37..3ab5d5a47 100644
--- a/src/mesh/mesh_block_lib.c
+++ b/src/mesh/mesh_block_lib.c
@@ -66,25 +66,25 @@ int
66GNUNET_MESH_regex_block_check (const struct MeshRegexBlock *block, 66GNUNET_MESH_regex_block_check (const struct MeshRegexBlock *block,
67 size_t size) 67 size_t size)
68{ 68{
69 return GNUNET_MESH_regex_block_iterate(NULL, block, size, &check_edge); 69 return GNUNET_MESH_regex_block_iterate(block, size, &check_edge, NULL);
70} 70}
71 71
72 72
73/** 73/**
74 * Iterate over all edges of a block of a regex state. 74 * Iterate over all edges of a block of a regex state.
75 * 75 *
76 * @param cls Closure for the iterator.
77 * @param block Block to iterate over. 76 * @param block Block to iterate over.
78 * @param size Size of block. 77 * @param size Size of block.
79 * @param iterator Function to call on each edge in the block. 78 * @param iterator Function to call on each edge in the block.
79 * @param iter_cls Closure for the iterator.
80 * 80 *
81 * @return How many bytes of block have been processed 81 * @return How many bytes of block have been processed
82 */ 82 */
83int 83int
84GNUNET_MESH_regex_block_iterate (void *cls, 84GNUNET_MESH_regex_block_iterate (const struct MeshRegexBlock *block,
85 const struct MeshRegexBlock *block,
86 size_t size, 85 size_t size,
87 GNUNET_MESH_EgdeIterator iterator) 86 GNUNET_MESH_EgdeIterator iterator,
87 void *iter_cls)
88{ 88{
89 struct MeshRegexEdge *edge; 89 struct MeshRegexEdge *edge;
90 unsigned int n; 90 unsigned int n;
@@ -115,7 +115,7 @@ GNUNET_MESH_regex_block_iterate (void *cls,
115 return GNUNET_SYSERR; 115 return GNUNET_SYSERR;
116 aux = (char *) &edge[1]; // Skip edge block 116 aux = (char *) &edge[1]; // Skip edge block
117 if (NULL != iterator) 117 if (NULL != iterator)
118 if (GNUNET_NO == iterator (cls, aux, n_token, &edge->key)) 118 if (GNUNET_NO == iterator (iter_cls, aux, n_token, &edge->key))
119 return GNUNET_OK; 119 return GNUNET_OK;
120 aux = &aux[n_token]; // Skip edge token 120 aux = &aux[n_token]; // Skip edge token
121 } 121 }
diff --git a/src/mesh/mesh_block_lib.h b/src/mesh/mesh_block_lib.h
index 47e63289c..ac8a09956 100644
--- a/src/mesh/mesh_block_lib.h
+++ b/src/mesh/mesh_block_lib.h
@@ -69,18 +69,18 @@ typedef int (*GNUNET_MESH_EgdeIterator)(void *cls,
69/** 69/**
70 * Iterate over all edges of a block of a regex state. 70 * Iterate over all edges of a block of a regex state.
71 * 71 *
72 * @param cls Closure for the iterator.
73 * @param block Block to iterate over. 72 * @param block Block to iterate over.
74 * @param size Size of block. 73 * @param size Size of block.
75 * @param iterator Function to call on each edge in the block. 74 * @param iterator Function to call on each edge in the block.
75 * @param iter_cls Closure for the iterator.
76 * 76 *
77 * @return GNUNET_SYSERR if an error has been encountered, GNUNET_OK otherwise 77 * @return GNUNET_SYSERR if an error has been encountered, GNUNET_OK otherwise
78 */ 78 */
79int 79int
80GNUNET_MESH_regex_block_iterate (void *cls, 80GNUNET_MESH_regex_block_iterate (const struct MeshRegexBlock *block,
81 const struct MeshRegexBlock *block,
82 size_t size, 81 size_t size,
83 GNUNET_MESH_EgdeIterator iterator); 82 GNUNET_MESH_EgdeIterator iterator,
83 void *iter_cls);
84 84
85#if 0 /* keep Emacsens' auto-indent happy */ 85#if 0 /* keep Emacsens' auto-indent happy */
86{ 86{