Can do better...
This is still an uninformative comment:
for (i = 0; i < num_elements; i++)
if (elements[i] == 0)
i++; /* Ignore the next element */
- since it gives no reason why we ignore the next element.
The syntax tells you its ignoring the next element, thats easy
to see. Comments should dig deeper into the semantics, and
say things like '/* ignore zero-length data packets */'
And it might also be worth commenting why the code always
calls 'frob' on the first element!