Revision 80b2d694 output.c

View differences:

output.c
28 28
void output_init(int bufsize)
29 29
{
30 30
  if (!buff) {
31
    int i;
32

  
31 33
    buff_size = bufsize;
32 34
    buff = malloc(sizeof(struct outbuf) * buff_size);
33 35
    if (!buff) {
34 36
     fprintf(stderr, "Error: can't allocate output buffer\n");
35 37
     exit(1);
36 38
    }
39
    for (i = 0; i < buff_size; i++) {
40
      buff[i].data = NULL;
41
    }
37 42
  } else {
38 43
   fprintf(stderr, "Error: output buffer re-init not allowed!\n");
39 44
   exit(1);

Also available in: Unified diff