Revision ef4061e4 src/net_helper.c

View differences:

src/net_helper.c
210 210
  return (memcmp(&s1->addr, &s2->addr, sizeof(struct sockaddr_in)) == 0);
211 211
}
212 212

  
213
int nodeid_cmp(const struct nodeID *s1, const struct nodeID *s2)
214
{
215
  return memcmp(&s1->addr, &s2->addr, sizeof(struct sockaddr_in));
216
}
217

  
213 218
int nodeid_dump(uint8_t *b, const struct nodeID *s, size_t max_write_size)
214 219
{
215 220
  if (max_write_size < sizeof(struct sockaddr_in)) return -1;

Also available in: Unified diff