Revision adadc388 som/ChunkIDSet/chunkids_ops.c

View differences:

som/ChunkIDSet/chunkids_ops.c
7 7
#include <stdlib.h>
8 8
#include <stdint.h>
9 9
#include <limits.h>
10
#include <assert.h>
10 11

  
11 12
#include "chunkids_private.h"
12 13
#include "chunkidset.h"
......
27 28
  p->n_elements = 0;
28 29
  cfg_tags = config_parse(config);
29 30
  res = config_value_int(cfg_tags, "size", &p->size);
30
  if (res < 0) {
31
  if (!res) {
31 32
    p->size = 0;
32 33
  }
33 34
  if (p->size) {
......
36 37
    p->elements = NULL;
37 38
  }
38 39
  res = config_value_int(cfg_tags, "type", &p->type);
39
  if (res < 0) {
40
  if (!res) {
40 41
    p->type = CIST_PRIORITY;
41 42
  }
42 43
  if(!p->type)

Also available in: Unified diff