Loop body is not enclosed in
{}
25
26typedef struct node_t Node;
27
28typedef struct {29 Node* first;30 Node* last;
31} LinkedList;
32
Description
Loop body not being enclosed in {}
can make it confusing and hard to read,
hence consider using {}
for loop body.
Bad practice
int x = 0;
while (x < 10) x++;
Recommended
int x = 0;
while (x < 10) {
x++;
}