Revision 438e6c03 som/ChunkIDSet/chunkids_ha.c

View differences:

som/ChunkIDSet/chunkids_ha.c
6 6

  
7 7
#include <stdlib.h>
8 8
#include <stdint.h>
9
#include <limits.h>
10 9
#include <assert.h>
11 10

  
12 11
#include "chunkidset.h"
13 12

  
14
int chunkID_set_get_earliest(const struct chunkID_set *h)
13
uint32_t chunkID_set_get_earliest(const struct chunkID_set *h)
15 14
{
16
  int i, min;
15
  int i;
16
  uint32_t min;
17 17

  
18 18
  if (chunkID_set_size(h) == 0) {
19
    return -1;
19
    return CHUNKID_INVALID;
20 20
  }
21 21
  min = chunkID_set_get_chunk(h, 0);
22 22
  for (i = 1; i < chunkID_set_size(h); i++) {
......
28 28
  return min;
29 29
}
30 30

  
31
int chunkID_set_get_latest(const struct chunkID_set *h)
31
uint32_t chunkID_set_get_latest(const struct chunkID_set *h)
32 32
{
33
  int i, max;
33
  int i;
34
  uint32_t  max;
34 35

  
35 36
  if (chunkID_set_size(h) == 0) {
36
    return -1;
37
    return CHUNKID_INVALID;
37 38
  }
38 39
  max = chunkID_set_get_chunk(h, 0);
39 40
  for (i = 1; i < chunkID_set_size(h); i++) {

Also available in: Unified diff