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

Re: svn commit: rev 1699 - trunk/subversion/clients/cmdline

From: Greg Stein <gstein_at_lyra.org>
Date: 2002-04-15 08:48:17 CEST

On Sun, Apr 14, 2002 at 03:55:58AM -0500, striker@tigris.org wrote:
>...
> +++ trunk/subversion/clients/cmdline/main.c Sun Apr 14 03:55:58 2002
> @@ -353,7 +353,10 @@
> char *opts;
>
> if (opt == NULL)
> - *string = apr_psprintf (pool, "?");
> + {
> + *string = apr_psprintf (pool, "?");
> + return;
> + }

Woah. Two comments:

1) it would be nice if the 'string' parameter were a 'const' param. That
   would allow the code to simply say: *string = "?";

2) if a modifiable string is needed, then the above is much simpler as:
   *string = apr_pstrdup(pool, "?");
   [ that is: it doesn't go thru the whole printf nonsense ]

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Apr 15 08:48:36 2002

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