heapster-saw/examples/iter_linked_list.c
/* Compute the length of a list */
Compute the length of a list
Compute the length of a list
int64_t length (list64_t *l) {
  int64_t len = 0;
  for (; l != NULL; l = l->next) {
    ++len;
  }
  return len;
}
int64_t length ( list64_t * l ) { int64_t len = 0 ; for ( ; l != NULL ; l = l -> next ) { ++ len ; } return len ; }
Compute the length of a list
Compute the length of a list