VirtualBox

Changeset 10957 in vbox


Ignore:
Timestamp:
Jul 29, 2008 8:23:50 PM (17 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
33827
Message:

more cosmetics.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibGuestProp.cpp

    r10956 r10957  
    437437 * Raw API for enumerating guest properties which match a given pattern.
    438438 *
    439  * @returns VINF_SUCCESS on success and pcBuf points to a packed array
     439 * @returns VBox status code.
     440 * @retval  VINF_SUCCESS on success and pcBuf points to a packed array
    440441 *          of the form <name>, <value>, <timestamp string>, <flags>,
    441442 *          terminated by four empty strings.  pcbBufActual will contain the
    442443 *          total size of the array.
    443  * @returns VERR_BUFFER_OVERFLOW if the buffer provided was too small.  In
     444 * @retval VERR_BUFFER_OVERFLOW if the buffer provided was too small.  In
    444445 *          this case pcbBufActual will contain the size of the buffer needed.
    445446 * @returns IPRT error code in other cases, and pchBufActual is undefined.
     447 *
    446448 * @param   u32ClientId   The client ID returned by VbglR3GuestPropConnect
    447449 * @param   paszPatterns  A packed array of zero terminated strings, terminated
     
    454456 */
    455457VBGLR3DECL(int) VbglR3GuestPropEnumRaw(uint32_t u32ClientId,
    456                                        const char *paszPatterns,
     458                                       const char *pszzPatterns,
    457459                                       char *pcBuf,
    458460                                       uint32_t cbBuf,
     
    467469    /* Get the length of the patterns array... */
    468470    uint32_t cchPatterns = 0;
    469     for (uint32_t cchCurrent = strlen(paszPatterns); cchCurrent != 0;
    470          cchCurrent = strlen(paszPatterns + cchPatterns))
     471    for (uint32_t cchCurrent = strlen(pszzPatterns); cchCurrent != 0;
     472         cchCurrent = strlen(pszzPatterns + cchPatterns))
    471473        cchPatterns += cchCurrent + 1;
    472474    /* ...including the terminator. */
    473475    ++cchPatterns;
    474     VbglHGCMParmPtrSet(&Msg.patterns, const_cast<char *>(paszPatterns),
     476    VbglHGCMParmPtrSet(&Msg.patterns, const_cast<char *>(pszzPatterns),
    475477                       cchPatterns);
    476478    VbglHGCMParmPtrSet(&Msg.strings, pcBuf, cbBuf);
     
    480482    if (RT_SUCCESS(rc))
    481483        rc = Msg.hdr.result;
    482     if (   (RT_SUCCESS(rc) || (VERR_BUFFER_OVERFLOW == rc))
    483         && (pcbBufActual != NULL)
    484        )
     484    if (   pcbBufActual
     485        && (    RT_SUCCESS(rc)
     486            ||  rc == VERR_BUFFER_OVERFLOW))
    485487    {
    486488        int rc2 = VbglHGCMParmUInt32Get(&Msg.size, pcbBufActual);
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette