heapster-saw/examples/iter_linked_list.c
/* Test if a specific value is in a list, returning 1 if so and 0 otherwise */
Test if a specific value is in a list, returning 1 if so and 0 otherwise
Test if a specific value is in a list returning 1 if so and 0 otherwise
int64_t is_elem (int64_t x, list64_t *l) {
  for (; l != NULL; l = l->next) {
    if (l->data == x)
      return 1;
  }
  return 0;
}
int64_t is_elem ( int64_t x , list64_t * l ) { for ( ; l != NULL ; l = l -> next ) { if ( l -> data == x ) return 1 ; } return 0 ; }
Test if a specific value is in a list, returning 1 if so and 0 otherwise
Test if a specific value is in a list returning 1 if so and 0 otherwise