Project

General

Profile

Revision ea46eeca

IDea46eeca23f3682f8c2d35558f76b19f0bfe0c78
Parent 4d22fe8e
Child e247ef4d

Added by Thomas Mullins over 10 years ago

Simplified read_file

View differences:

mainbox/query.c
34 34
  }
35 35

  
36 36
  tooltron_password = read_file("tooltron_password");
37
  if (!tooltron_password)
37
  if (tooltron_password == NULL)
38 38
    return 1;
39
  len = strlen(tooltron_password);
40
  while (len > 0 && tooltron_password[len-1] == '\n')
41
    tooltron_password[--len] = '\0';
42 39

  
43 40
  return 0;
44 41
}

Also available in: Unified diff