The result of sizeof is size_t so we should use the correct type. We can safely cast the arithmetic to size_t as the while loop checks that the subtraction will not result in a negative number.