Revision ced82324 som/ChunkBuffer/config.c

View differences:

som/ChunkBuffer/config.c
14 14
{
15 15
  /* Fake Implementation */
16 16
  struct tag *res;
17
  int i = 0;
17 18

  
18 19
  res = malloc(sizeof(struct tag) * MAX_TAGS);
19 20
  if (res == NULL) {
20 21
    return res;
21 22
  }
22
  strcpy(res[0].name, "size");
23
  strcpy(res[0].value, "32");
24
  res[1].name[0] = 0;
23
  strcpy(res[i].name, "size");
24
  strcpy(res[i++].value, "32");
25
  res[i++].name[0] = 0;
26

  
27
  res = realloc(res, sizeof(struct tag) * i);
25 28

  
26 29
  return res;
27 30
}

Also available in: Unified diff