fixed index of for-loop
authorJulius Bünger <buenger@mytum.de>
Wed, 7 Jan 2015 19:49:40 +0000 (19:49 +0000)
committerJulius Bünger <buenger@mytum.de>
Wed, 7 Jan 2015 19:49:40 +0000 (19:49 +0000)
src/rps/gnunet-service-rps_sampler.c

index 952ed8794fe05916dea9a126a5d999dd812fc337..a74d304df8b127f266bb82b77ea82e8940f50687 100644 (file)
@@ -363,7 +363,7 @@ RPS_sampler_resize (unsigned int new_size)
         "SAMPLER: sampler->sampler_elements now points to %p\n",
         sampler->sampler_elements);
 
-    for (i = new_size ; i < old_size ; i++)
+    for (i = 0 ; i < old_size - new_size ; i++)
     {/* Remove unneeded rest */
       LOG (GNUNET_ERROR_TYPE_DEBUG, "SAMPLER: Removing %" PRIX64 ". sampler\n", i);
       if (NULL != sampler->remove_cb)