diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mesh/gnunet-service-mesh.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mesh/gnunet-service-mesh.c b/src/mesh/gnunet-service-mesh.c index 7a04302b0..887507cd1 100644 --- a/src/mesh/gnunet-service-mesh.c +++ b/src/mesh/gnunet-service-mesh.c | |||
@@ -4624,13 +4624,15 @@ queue_destroy (struct MeshPeerQueue *queue, int clear_cls) | |||
4624 | unsigned int j2; | 4624 | unsigned int j2; |
4625 | unsigned int j3; | 4625 | unsigned int j3; |
4626 | 4626 | ||
4627 | for (j = i; j < cinfo->send_buffer_n - 1; j++) | 4627 | for (j = i, j2 = 0, j3 = 0; j < cinfo->send_buffer_n - 1; j++) |
4628 | { | 4628 | { |
4629 | j2 = (cinfo->send_buffer_start + j) % max; | 4629 | j2 = (cinfo->send_buffer_start + j) % max; |
4630 | j3 = (cinfo->send_buffer_start + j + 1) % max; | 4630 | j3 = (cinfo->send_buffer_start + j + 1) % max; |
4631 | cinfo->send_buffer[j2] = cinfo->send_buffer[j3]; | 4631 | cinfo->send_buffer[j2] = cinfo->send_buffer[j3]; |
4632 | } | 4632 | } |
4633 | |||
4633 | cinfo->send_buffer[j3] = NULL; | 4634 | cinfo->send_buffer[j3] = NULL; |
4635 | |||
4634 | cinfo->send_buffer_n--; | 4636 | cinfo->send_buffer_n--; |
4635 | } | 4637 | } |
4636 | } | 4638 | } |