Fix bug ID 0000006 reported by leuk_he

Remove check for NumArg > 0. Always call va_start, va_end.


git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@69 119443c7-1b9e-41f8-b6fc-b9c35fce742c
This commit is contained in:
Nektarios K. Papadopoulos 2006-07-26 13:37:40 +00:00
parent 5c03ebe6e1
commit 7c49b3b8a4

View File

@ -348,14 +348,9 @@ UpnpMakeAction( const char *ActionName,
va_list ArgList;
IXML_Document *out = NULL;
if( NumArg > 0 ) {
va_start( ArgList, Arg );
}
va_start( ArgList, Arg );
out = makeAction( 0, ActionName, ServType, NumArg, Arg, ArgList );
if( NumArg > 0 ) {
va_end( ArgList );
}
va_end( ArgList );
return out;
}
@ -390,14 +385,9 @@ UpnpMakeActionResponse( const char *ActionName,
va_list ArgList;
IXML_Document *out = NULL;
if( NumArg > 0 ) {
va_start( ArgList, Arg );
}
va_start( ArgList, Arg );
out = makeAction( 1, ActionName, ServType, NumArg, Arg, ArgList );
if( NumArg > 0 ) {
va_end( ArgList );
}
va_end( ArgList );
return out;
}