Revision 98bc2380 som/ChunkBuffer/buffer.c

View differences:

som/ChunkBuffer/buffer.c
52 52
  }
53 53
  if (min < id) {
54 54
    chunk_free(&cb->buffer[pos_min]);
55
    cb->num_chunks--;
55 56

  
56 57
    return pos_min;
57 58
  }
......
103 104
  } else {
104 105
    i = 0;
105 106
  }
107

  
108
  if (i < 0) {
109
    return i;
110
  }
106 111
  
107 112
  while(1) {
108 113
    if (cb->buffer[i].id < 0) {

Also available in: Unified diff