On 20 March 2010 19:24, Rob <robpilling_AT_gmail.com> wrote:
>> sic segfaults when USER environment variable is not set (so
>> getenv("USER") returns NULL):
>
>
> This does the trick, at no line cost. I assume that when compiled, the
> two getenv calls can be merged into one, optimisation wise. Not that
> it's a major speed problem.
>
>
> 169c169
> < strncpy(nick, getenv("USER"), sizeof nick);
> ---
>> strncpy(nick, getenv("USER") ? getenv("USER") : "lolidunno", sizeof nick);
I applied a similar patch to hg tip, +1 LOC.
Cheers,
Anselm
Received on Mon Mar 22 2010 - 13:30:10 UTC
This archive was generated by hypermail 2.2.0 : Mon Mar 22 2010 - 13:36:02 UTC