Changeset 4066


Ignore:
Timestamp:
12/08/10 15:58:39 (13 years ago)
Author:
schlocke
Message:

cccam: fixed dup cards check

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/module-cccam.c

    r4065 r4066  
    17601760
    17611761int same_first_node(struct cc_card *card1, struct cc_card *card2) {
    1762     uint8 * node1 = card1->remote_nodes->obj;
    1763     uint8 * node2 = card2->remote_nodes->obj;
     1762    uint8 * node1 = ll_has_elements(card1->remote_nodes);
     1763    uint8 * node2 = ll_has_elements(card2->remote_nodes);
    17641764
    17651765    if (!node1 && !node2) return 1; //both NULL, same!
  • trunk/module-datastruct-llist.c

    r3634 r4066  
    217217}
    218218
     219//Returns first object if there is one
     220void *ll_has_elements(LLIST *l) {
     221  if (!l || !l->initial)
     222    return NULL;
     223  return l->initial->obj;
     224}
     225
  • trunk/module-datastruct-llist.h

    r3611 r4066  
    4545
    4646int ll_count(LLIST *l);                 // return number of items in list
     47void *ll_has_elements(LLIST *l);
    4748
    4849#endif
Note: See TracChangeset for help on using the changeset viewer.