bug-wget
[Top][All Lists]
Advanced

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

Re: Confusing "Success" error message


From: Andries E. Brouwer
Subject: Re: Confusing "Success" error message
Date: Fri, 8 Nov 2019 00:03:33 +0100
User-agent: Mutt/1.10.1 (2018-07-13)

On Thu, Nov 07, 2019 at 09:43:00PM +0100, Tim Rühsen wrote:

> This commit should have fixed it:
> 
> commit 3056617e9cf9a2c68989a2ff4e4266f6e7a4de45
> Author: Tim Rühsen <address@hidden>
> Date:   Wed Feb 10 15:23:13 2016 +0100
> 
>     Retain value of errno in logprintf()
> 
>     * src/log.c (logprintf): Save&Restore value of errno

Usually it is inconvenient to save and restore errno all the time.
I read

      err = gethttp (u, original_url, &hstat, dt, proxy, iri, count);
      tms = datetime_str (time (NULL));
      if (hstat.newloc)
        *newloc = xstrdup (hstat.newloc);
      switch (err) {
      ... use errno ...

The hope is probably that errno is the errno from gethttp.
But does time() preserve errno?
And does datetime_str() preserve errno?
It calls fmttime() which calls localtime() and strftime().

Life is easier if gethttp has an &errnosv parameter.

Andries



reply via email to

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