[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 2706 - trunk/subversion/clients/cmdline

From: Greg Stein <gstein_at_lyra.org>
Date: 2002-07-25 21:13:28 CEST

On Thu, Jul 25, 2002 at 10:53:11AM -0500, cmpilato@tigris.org wrote:
>...
> +++ trunk/subversion/clients/cmdline/log-cmd.c Thu Jul 25 10:53:11 2002
>...
> @@ -347,16 +345,33 @@
> hi = apr_hash_next (hi))
> {
> void *val;
> - char action;
> char *actionstr;
> -
> + svn_log_changed_path_t *log_item;
> +
> apr_hash_this(hi, (void *) &path, NULL, &val);
> - action = (char) ((int) val);
> + log_item = val;
>
> - actionstr = apr_psprintf (pool, "%c", action);
> - /* <path action="X">xxx</path> */
> - svn_xml_make_open_tag (&sb, pool, svn_xml_protect_pcdata, "path",
> - "action", actionstr, NULL);
> + actionstr = apr_psprintf (pool, "%c", log_item->action);

Yikes! How about:

  char actionstr[2];
  
  actionstr[0] = action;
  actionstr[1] = '\0';

That'll keep it off the heap, and help perf (microscopically :-).

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 Thu Jul 25 21:11:04 2002

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.