Hi Nadir,
        This is a bit of code that remained when I was looking at configuring SSL.  The code could be updated to the following...

    m_sArguments[6] = "false";

   if( (pszArg = pszArguments) != NULL)
   {
       do
       {
           if( pszArg == (char *) 1)
               m_sArguments[iArgIndex] = "true";
           else
               m_sArguments[iArgIndex] = pszArg;

           iArgIndex++;
       }
       while( (pszArg = va_arg( args, char *)) != NULL && iArgIndex < 8);
   }

        But there is no real reason for having this code and it could be shortened to;-

    if( (pszArg = pszArguments) != NULL)
   {
       do
       {
           m_sArguments[iArgIndex] = pszArg;

           iArgIndex++;
       }
       while( (pszArg = va_arg( args, char *)) != NULL && iArgIndex < 8);
   }

Regards,

Fred Preston.



Nadir Amra <[EMAIL PROTECTED]>

28/04/2006 06:19

Please respond to
"Apache AXIS C Developers List" <[email protected]>

To
"Apache AXIS C Developers List" <[email protected]>
cc
Subject
Stub::SetSecure() question





There is a line of code that I do not quite understand in Stub::SetSecure.
Here is the routine:

   va_list args;
   char *  pszArg = NULL;

   va_start( args, pszArguments);

   if( (pszArg = pszArguments) != NULL)
   {
       do
       {
           if( pszArg == (char *) 1)
               m_sArguments[iArgIndex] = "true";
           else
               m_sArguments[iArgIndex] = pszArg;

           iArgIndex++;
       }
       while( (pszArg = va_arg( args, char *)) != NULL && iArgIndex < 8);

       if( iArgIndex == 6)
           m_sArguments[iArgIndex] = "false";
   }

   va_end( args);

The line I do not understand is

           if( pszArg == (char *) 1)

Can someone please explain how this works?

Nadir K. Amra


Reply via email to