bug-wget
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-wget] [PATCH] Trivial changes in HSTS


From: Tim Rühsen
Subject: Re: [Bug-wget] [PATCH] Trivial changes in HSTS
Date: Tue, 24 May 2016 21:10:45 +0200
User-agent: KMail/4.14.10 (Linux/4.5.0-2-amd64; KDE/4.14.20; x86_64; ; )

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

Attachment: signature.asc
Description: This is a digitally signed message part.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]