X-Git-Url: https://git.octo.it/?p=collectd.git;a=blobdiff_plain;f=src%2Fperl.c;h=5ad99ee451e3018c915805157786c9c5e35d1abc;hp=cf3004470941475d42efa6c90b953456e3cde04f;hb=a9e50e9e30ecde17e167e271060c8183bfcbf407;hpb=7b8851b26928b609ce850e78c1eabb50ff319244 diff --git a/src/perl.c b/src/perl.c index cf300447..5ad99ee4 100644 --- a/src/perl.c +++ b/src/perl.c @@ -706,10 +706,8 @@ static int value_list2hv(pTHX_ value_list_t *vl, data_set_t *ds, HV *hash) { static int notification_meta2av(pTHX_ notification_meta_t *meta, AV *array) { int meta_num = 0; - - while (meta) { + for (notification_meta_t *m = meta; m != NULL; m = m->next) { ++meta_num; - meta = meta->next; } av_extend(array, meta_num);