Check if file object is valid

pull/25/head
Shawn webb 13 years ago
parent d1bfe559cd
commit 022677ab61
  1. 4
      clamconf/clamconf.c

@ -232,8 +232,12 @@ static void print_platform(struct cli_environment *env)
if (!access("/etc/release", R_OK)) {
char buf[1024];
FILE *f = fopen("/etc/release", "r");
if (f) {
fgets(buf, sizeof(buf), f);
printf("Full OS version: %s", buf);
fclose(f);
}
}
#endif

Loading…
Cancel
Save