I see bzero() is in fact deprecated these days; POSIX has dropped it from its specs.  So memset(last5_vals, 0, sizeof(last5_vals)); is the way to go, instead of this loop.