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

Re: svn commit: r27180 - in trunk/subversion: include libsvn_client libsvn_wc svn

From: C. Michael Pilato <cmpilato_at_collab.net>
Date: 2007-10-16 04:29:29 CEST

Eric Gillespie wrote:
>> +svn_wc_conflict_result_t *
>> +svn_wc_create_conflict_result(svn_wc_conflict_choice_t choice,
>> + const char *merged_file,
>> + apr_pool_t *pool)
>> +{
>> + svn_wc_conflict_result_t *result = apr_pcalloc(pool, sizeof(*result));
>
> You explicitly initialize the only two fields, so just use palloc
> instead of pcalloc.

Aaaaah... sorry, while you are absolutely correct in your thinking, I don't
really care for that piece of advice, because you just *know* the next time
somebody adds a field to that structure whose default value is supposed to
be 0, they'll not notice that the memory wasn't cleared. I mean, really,
what does a memset() cost today, and what effect will that have on the cost
of an 'svn update' operation anyway?

-- 
C. Michael Pilato <cmpilato@collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand

Received on Tue Oct 16 04:29:29 2007

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.