Adjusted helper function in sort_utils_test.c.