Hi,

On Tue, 5 Feb 2008, Kirill wrote:

> > -----Original Message-----
> > From: Johannes Schindelin [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, February 05, 2008 7:47 AM
> 
> > On Mon, 4 Feb 2008, Kirill wrote:
> > > - hanging on the result of GetEnvironmentStrings for very long;
> >
> > But it is not free()d in that case, right?
>
> Right. In other words, if msys_path is NULL then FreeEnvironmentStrings 
> will not be called [probably ever]. Thus, in case we can't find msys, 
> I'd rather still copy the block but without modifying it with msys_path.

IOW it would be an identical copy.  But since we do not -- ever -- call 
FreeEnvironmentStrings() in that case, we already have a perfect copy, 
right?

> > > The bottom line: your solution is indeed much more efficient,
> > > however, I'm having hard time to call it "nicer" (as in "prettier").
> >
> > ;-)  Yeah, for me, more concise is almost always "nicer"
>
> Ok, you convinced me. I'll use your solution with my suggestion above.

Sure.  And please add a comment above the memcpy() along the lines

                        /*
                         * Append the environment variables after the 
                         * original PATH.
                         */

Thanks,
Dscho

Reply via email to