Revision e247ef4d mainbox/util.c

View differences:

mainbox/util.c
28 28
    return NULL;
29 29
  }
30 30

  
31
  fgets(buf, BUF_SIZE, file);
32

  
33
  if (ferror(file)) {
31
  if (fgets(buf, BUF_SIZE, file) == NULL && ferror(file)) {
34 32
    log_perror(filename);
35 33
    fclose(file);
36 34
    return NULL;

Also available in: Unified diff