Revision 4944dc2a som/ChunkIDSet/chunkids_ops.c

View differences:

som/ChunkIDSet/chunkids_ops.c
113 113
  int i;
114 114
  uint32_t min;
115 115

  
116
  min = (uint32_t)-1;
116
  min = h->n_elements ? h->elements[0] : 0;
117 117
  for (i = 0; i < h->n_elements; i++) {
118 118
    min = (h->elements[i] < min) ? h->elements[i] : min;
119 119
  }
......
126 126
  int i;
127 127
  uint32_t max;
128 128

  
129
  max = 0;
129
  max = h->n_elements ? h->elements[0] : 0;
130 130
  for (i = 0; i < h->n_elements; i++) {
131 131
    max = (h->elements[i] > max) ? h->elements[i] : max;
132 132
  }

Also available in: Unified diff