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

A do-nothing loop?

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: 2003-10-10 20:30:00 CEST

It looks like the "for" loop in this code is just wasting time. Am I right?

subversion/libsvn_client/prop_commands.c:

svn_error_t *
svn_client_revprop_list (apr_hash_t **props,
                         const char *URL,
                         const svn_opt_revision_t *revision,
                         svn_revnum_t *set_rev,
                         svn_client_ctx_t *ctx,
                         apr_pool_t *pool)
{
  void *ra_baton, *session;
  svn_ra_plugin_t *ra_lib;
  apr_hash_t *proplist;
  apr_hash_index_t *hi;

[...]

  /* The actual RA call. */
  SVN_ERR (ra_lib->rev_proplist (session, *set_rev, &proplist, pool));

  for (hi = apr_hash_first (pool, proplist); hi; hi = apr_hash_next (hi))
    {
      const void *key;
      void *val;
      apr_ssize_t klen;

      apr_hash_this (hi, &key, &klen, &val);
      apr_hash_set (proplist, key, klen, val);
    }

  *props = proplist;
  return SVN_NO_ERROR;
}

- Julian

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Oct 10 20:29:23 2003

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.