[tz] defensive value for define on Solaris causes load of timerule to fail
Brian Inglis
Brian.Inglis at SystematicSw.ab.ca
Mon Jun 12 22:41:53 UTC 2017
On 2017-06-12 15:10, Christos Zoulas wrote:
> On Jun 12, 11:21am, eggert at cs.ucla.edu (Paul Eggert) wrote:
> -- Subject: Re: [tz] defensive value for define on Solaris causes load of tim
>
> | return EINVAL;
> | if (sizeof lsp->fullname - 1 <=3D strlen(p) + strlen(name))
> | return ENAMETOOLONG;
> | - strcpy(fullname, p);
> | - strcat(fullname, "/");
> | - strcat(fullname, name);
> | + strcpy(lsp->fullname, p);
> | + strcat(lsp->fullname, "/");
> | + strcat(lsp->fullname, name);
>
> Why not:
>
> snprintf(lsp->fullname, sizeof(lsp_fullname), "%s/%s", p, name);
>
> and remove more code...
>From another post today:
> /*
> ** We avoid using snprintf since it's not available on all systems.
> */
--
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada
More information about the tz
mailing list