On 20 March 2010 19:24, Rob <robpill...@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

Reply via email to