Am Dienstag, 24. Mai 2016, 14:11:15 schrieb Ander Juaristi: > Hi, > > On 11/04/16 16:51, Tim Ruehsen wrote: > > Did you consider Giuseppe's suggestion ? > > "can the file_exists_p check just be moved to hsts_file_access_valid that > > doesn't return an error on ENOENT? In other words, just have here: > > if (hsts_file_access_valid (filename))" > > New patch attached.
Hi Ander,
could you rearrange the code in hsts_store_open() a bit to
- avoid double calling file_exists_p (filename)
- reduce the scope of 'st' and 'fp'
if (file_exists_p (filename)) {
if (hsts_file_access_valid (filename)) {
struct_stat st;
FILE *fp = fopen (filename, "r");
...
} else {
...
}
out:
return store;
}
Regards, Tim
signature.asc
Description: This is a digitally signed message part.
