[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 1287 - trunk/subversion/libsvn_wc

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2002-02-15 03:04:12 CET

joe@tigris.org writes:

> Author: joe
> Date: 2002-02-15 01:04 GMT
> New Revision: 1287
>
> Modified:
> trunk/subversion/libsvn_wc/entries.c
> Log:
> * libsvn_wc/entries.c (fold_entry): Don't examine an 'va_list'
> argument except using the va_arg macro.
>
>
> Modified: trunk/subversion/libsvn_wc/entries.c
> ==============================================================================
> --- OLD/trunk/subversion/libsvn_wc/entries.c Thu Feb 14 19:04:06 2002
> +++ NEW/trunk/subversion/libsvn_wc/entries.c Thu Feb 14 19:04:06 2002
> @@ -1009,6 +1009,7 @@
> {
> apr_hash_index_t *hi;
> svn_wc_entry_t *entry = apr_hash_get (entries, name->data, name->len);
> + const char *remove_me;
>
> assert (name != NULL);
>
> @@ -1087,12 +1088,8 @@
> normalize_entry (entry, pool);
>
> /* Remove any attributes named for removal. */
> - if (ap)
> - {
> - const char *remove_me;
> - while ((remove_me = va_arg (ap, const char *)) != NULL)
> - apr_hash_set (entry->attributes, remove_me, APR_HASH_KEY_STRING, NULL);
> - }
> + while ((remove_me = va_arg (ap, const char *)) != NULL)
> + apr_hash_set (entry->attributes, remove_me, APR_HASH_KEY_STRING, NULL);
>
> /* Make sure the entry exists in the entries hash. Possibly it
> already did, in which case this could have been skipped, but what

Breaks on Linux/gcc, it segfaults on svn up, make check, etc. It
appears to be whenever ap is NULL on entry to this function.

Is it valid to use va_arg without va_start? Is it valid to use va_arg
at all in a function without a ... prototype?

-- 
Philip
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:37:08 2006

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.