Use va_start to initialize empty va_list properly.
The solution has quite high overhead but
other future proof portable solution has not been found.
Problem was found and initial workaround has been provided
by Martin Meloun.
Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
return res;
}
+/* Local function to make initialization of empty va_list portable */
+static inline
+int evc_link_propagate_dead(evc_link_t *link, ...)
+{
+ va_list no_args;
+ int res;
+
+ va_start(no_args, link);
+ res=link->propagate(link,no_args);
+ va_end(no_args);
+ return res;
+}
+
/**
* evc_link_dispose - Disposes Link
* @link: pointer to the possibly connected initialized link
{
if(!link->dead){
link->dead=1;
- if(!link->propagate(link,0)){
+ if(!evc_link_propagate_dead(link)) {
evc_link_inc_refcnt(link);
evc_link_delete(link);
if(link->malloced) free(link);