c, linear search of unsorted list