I have used such construct in C:
list->head = list->tail = NULL;
and now I consider whether this really mean what I suppose.
<
Neither of them. It mean
list->tail = NULL;
list->head = list->tail;
1 is incorrect because in case the type of list->tail
is not a pointer, it may yield different result because the value will be converted to the type of the destination of the assignment.
The order of two statements in 2 is incorrect.