[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Dead code or bug in gpg_agent.c

From: Hyrum K Wright <hyrum_at_hyrumwright.org>
Date: Wed, 10 Oct 2012 06:25:06 -0400

On Tue, Oct 9, 2012 at 4:34 AM, Daniel Shahaf <d.s_at_daniel.shahaf.name> wrote:
> Hyrum K Wright wrote on Mon, Oct 08, 2012 at 21:51:02 -0400:
>> Poking around subversion/libsvn_subr/gpg_agent.c I found this snippet
>> (at around line 325):
>>
>> [[[
>> /* Send DISPLAY to the gpg-agent daemon. */
>> display = getenv("DISPLAY");
>> if (display != NULL)
>> {
>> request = apr_psprintf(pool, "OPTION display=%s\n", display);
>> if (!send_option(sd, buffer, BUFFER_SIZE, "display", display, pool))
> ...
>>
>> I don't know enough about what's going on here. Is the first time the
>> variable is set supposed to be combined with the second, or is it just
>> a superfluous assignment which we can safely remove?
>>
>
> Remove it. The definition of send_option() recomputes REQUEST and sends
> it over the socket --- the copy here is not needed.

r1396534

-Hyrum
Received on 2012-10-10 12:25:48 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.