Pádraig Brady wrote:
> Note the following does show one unconditional use of the fprintftime return 
> in tar:
> https://codesearch.debian.net/search?q=%3D+*fprintftime+*%5C%28&literal=0
> So it might be plausible to change that and also change fprintftime()
> to return -1 on error (like fprintf).

It is actually a feature of fprintftime() that it cannot return -1, i.e.
that no errors except stream-related oness can occur. Just like programs
rely on
   fprintf (stdout, "%d\n", n);
to never produce an error for integer output, they can also rely on
fprintftime() to never punt (even with the recently added 3 non-Gregorian
calendars). It would be extra code in the programs, adding a fallback
like _("unknown time") if fprintftime() failed.

Just because the GNU tar code could accommodate fprintftime() returning -1
in one place, doesn't mean that it would be a good idea to allow this.

Bruno




Reply via email to