]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - fecdec_filter.c
fecdec_filter: Simplify clear_group().
[paraslash.git] / fecdec_filter.c
index 10f1c642034c9457af12e6c23a1450bbf5eb3245..195dbaae1814d08316df54cf0597c914c6c1abd9 100644 (file)
@@ -102,18 +102,11 @@ static void clear_group(struct fecdec_group *fg)
 {
        int i;
 
-       for (i = 0; i < fg->num_slices; i++) {
+       for (i = 0; i < fg->num_slices; i++)
                free(fg->data[i]);
-               fg->data[i] = NULL;
-               fg->idx[i] = -1;
-       }
        free(fg->data);
-       fg->data = NULL;
        free(fg->idx);
-       fg->idx = NULL;
-       fg->num_slices = 0;
-       memset(&fg->h, 0, sizeof(struct fec_header));
-       fg->num_received_slices = 0;
+       memset(fg, 0, sizeof(*fg));
 }
 
 static int find_group(struct fec_header *h,