Hm, unless you require the `c` array to be zeroed beforehand? This looks really hackish to me. So I would remove the `c=0` line from `apply_fd()` completely.