VirtualBox

Changeset 23893 in vbox for trunk/src/VBox/Additions/common


Ignore:
Timestamp:
Oct 20, 2009 8:59:51 AM (15 years ago)
Author:
vboxsync
Message:

VBoxGuestR3LibMisc.cpp: uninitialized return value

File:
1 edited

Legend:

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

    r23866 r23893  
    207207VBGLR3DECL(int) VbglR3GetAdditionsVersion(char **ppszVer, char **ppszRev)
    208208{
    209     int rc;
     209    int rc = VINF_SUCCESS;
    210210#ifdef RT_OS_WINDOWS
    211211    HKEY hKey;
     
    214214    /* Check the new path first. */
    215215    r = RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE\\Sun\\VirtualBox Guest Additions", 0, KEY_READ, &hKey);
    216 #ifdef RT_ARCH_AMD64
     216# ifdef RT_ARCH_AMD64
    217217    if (r != ERROR_SUCCESS)
    218218    {
     
    220220        r = RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE\\Wow6432Node\\Sun\\VirtualBox Guest Additions", 0, KEY_READ, &hKey);
    221221    }
    222 #endif
     222# endif
    223223
    224224    /* Still no luck? Then try the old xVM paths ... */
     
    226226    {
    227227        r = RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE\\Sun\\xVM VirtualBox Guest Additions", 0, KEY_READ, &hKey);
    228 #ifdef RT_ARCH_AMD64
     228# ifdef RT_ARCH_AMD64
    229229        if (r != ERROR_SUCCESS)
    230230        {
     
    232232            r = RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE\\Wow6432Node\\Sun\\xVM VirtualBox Guest Additions", 0, KEY_READ, &hKey);
    233233        }
    234 #endif
     234# endif
    235235    }
    236236
     
    265265    if (NULL != hKey)
    266266        RegCloseKey(hKey);
    267 #else
     267#else /* !RT_OS_WINDOWS */
    268268    /* On non-Windows platforms just return the compile-time version string atm. */
    269269    /* Version. */
     
    273273    if (ppszRev)
    274274        rc = RTStrAPrintf(ppszRev, "%s", VBOX_SVN_REV);
    275 #endif /* RT_OS_WINDOWS */
    276     return rc;
    277 }
     275#endif /* !RT_OS_WINDOWS */
     276    return rc;
     277}
Note: See TracChangeset for help on using the changeset viewer.

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