Revert "Update avg.c"

This reverts commit 4cb345ccef72d3da91420a3271ae1fd9e5964ada.