typedef struct bul { float x, y; float direction; float velocity; int type; struct bul *next; } bullet; [...] bullet *head = NULL; main(){ [...] bulletsUpdate(&head); [...] } [...] void bulletRemove(bullet **p) /* remove head */ { if (*p != NULL) { bullet *n = *p; *p = (*p)->next; free(n); } } void bulletsUpdate(bullet **n) { if ((*n) == NULL) return; while ((*n) != NULL) { (*n)->y -= (*n)->velocity; if ((*n)->y > 1000 || (*n)->y < -1000) bulletRemove(n); (*n) = (*n)->next; } }