Be explicit – then the compiler won’t warn that you perhaps made a mistake.
while ( (list = list->next) != NULL )
or
while ( (list = list->next) )
Some day you’ll be glad the compiler told you, people do make that mistake 😉
While that particular idiom is common, even more common is for people to use = when they mean ==. The convention when you really mean the = is to use an extra layer of parentheses:
while ((list = list->next)) { // yes, it’s an assignment