commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebb (JIRA)" <>
Subject [jira] Created: (DAEMON-163) __apxMultiSzToJvmOptions has odd use of IS_INVALID_HANDLE
Date Tue, 04 May 2010 14:33:55 GMT
__apxMultiSzToJvmOptions has odd use of IS_INVALID_HANDLE

                 Key: DAEMON-163
             Project: Commons Daemon
          Issue Type: Bug
            Reporter: Sebb

__apxMultiSzToJvmOptions has odd use of IS_INVALID_HANDLE:

    buff = apxPoolAlloc(hPool, (n + 1) * sizeof(JavaVMOption) + (l + 1));
    buff = apxAlloc((n + 1) * sizeof(JavaVMOption) + (l + 1));

The condition appears to be the wrong way round.

However, the method apxPoolAlloc also checks for IS_INVALID_HANDLE, and if true, the code
resolves to calling

__apxPoolAllocCore(_st_sys_pool, dwSize, 0)

which is exactly what apxAlloc() does. As far as I can tell, the hPool parameter is never
used here. 
If that is the intention, then just keep the code in the else part of the statement.
If not, then just keep the code in the if part of the statement.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message