Revision e247ef4d

View differences:

mainbox/query.c
23 23

  
24 24
int query_init(const char *server_name) {
25 25
  CURLcode error_code;
26
  int len;
27 26

  
28 27
  server = server_name;
29 28

  
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