Revision 057eff5c som/ChunkIDSet/chunkids_ops.c

View differences:

som/ChunkIDSet/chunkids_ops.c
110 110

  
111 111
int chunkID_set_get_earliest(const struct chunkID_set *h)
112 112
{
113
  int i, min;
113
  int i;
114
  uint32_t min;
114 115

  
115
  min = INT_MAX;
116
  min = (uint32_t)-1;
116 117
  for (i = 0; i < h->n_elements; i++) {
117 118
    min = (h->elements[i] < min) ? h->elements[i] : min;
118 119
  }
......
122 123

  
123 124
int chunkID_set_get_latest(const struct chunkID_set *h)
124 125
{
125
  int i, max;
126
  int i;
127
  uint32_t max;
126 128

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

Also available in: Unified diff