Revision 67700aad src/PeerSet/peerset_ops.c

View differences:

src/PeerSet/peerset_ops.c
6 6
 */
7 7

  
8 8
#include <stdlib.h>
9
#include <stdio.h>
9 10
#include <stdint.h>
10 11
#include <string.h>
11 12
#include <limits.h>
......
23 24
{
24 25
  const struct peer *peer = *(struct peer *const *)p;
25 26

  
26
  return nodeid_cmp( (const struct nodeID *) id, peer->id);
27
  if(id && p)
28
    return nodeid_cmp( (const struct nodeID *) id, peer->id);
29
  else
30
  {
31
    //fprintf(stderr,"[DEBUG] wrong peer or id\n");
32
    return 0;
33
  }
27 34
}
28 35

  
29 36
static int peerset_check_insert_pos(const struct peerset *h, const struct nodeID *id)

Also available in: Unified diff