[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: Daniel Shahaf <d.s_at_daniel.shahaf.name>
Date: Tue, 9 Oct 2012 10:34:56 +0200

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.

> -Hyrum
Received on 2012-10-09 10:35:41 CEST

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