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

Re: [PATCH] gpg-agent storage - add support for /run based sockets V2

From: Daniel Shahaf <d.s_at_daniel.shahaf.name>
Date: Thu, 4 May 2017 08:30:18 +0000

I have nothing to add to Stefan and James' review of functionality, so
here are a couple of style suggestions:

Lukas Jirkovsky wrote on Wed, May 03, 2017 at 23:03:42 +0200:
> +++ subversion/libsvn_subr/gpg_agent.c (working copy)
> @@ -225,6 +228,46 @@
> +find_gpgconf_agent_socket(apr_pool_t *pool)
> +{
> + apr_proc_t proc;
> + svn_stringbuf_t *line;
> + svn_error_t *err;
> + const char *gpgargv[] = { "gpgconf", "--list-dir", "agent-socket", NULL };
> +

You could add the second const here (after the asterisk) to remove the
need for the cast?

> + /* execute "gpgconf --list-dir agent-socket" */
> + err = svn_io_start_cmd3(&proc, NULL, "gpgconf", (const char* const*)gpgargv,
> + NULL, TRUE, FALSE, NULL, TRUE, NULL, FALSE, NULL,
> + pool);

Add "/* inherit */", "/* infile_pipe */", etc comments after the
booleans? (That's how we simulate Python's keyword arguments in C.)

Not trying to nitpick; just to make the code easier to read.

Cheers,

Daniel
Received on 2017-05-04 10:30:36 CEST

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