VirtualBox

Ignore:
Timestamp:
Nov 5, 2009 9:02:59 PM (15 years ago)
Author:
vboxsync
Message:

VBoxGuestR3LibHostVersion.cpp: why disable it when the string conversion fails? It contradicts the comment above... A simple strcmp is much more straight forward.

File:
1 edited

Legend:

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

    r24384 r24414  
    4949VBGLR3DECL(int) VbglR3HostVersionCompare(const char *pszVer1, const char *pszVer2)
    5050{
     51    /** @todo r=bird: not checking the return code, may be using uninitialized
     52     *        variables... I'll fix this when moving into the runtime.  */
    5153    int iVer1Major, iVer1Minor, iVer1Build;
    5254    sscanf(pszVer1, "%d.%d.%d", &iVer1Major, &iVer1Minor, &iVer1Build);
     
    112114    {
    113115        /* Only don't do the check if we have a valid "0" in it */
    114         if (   *pszCheckHostVersion
    115             && RTStrToInt16(pszCheckHostVersion) == 0) /* Either string conversion failed or we really did disable it */
     116        if (!strcmp(pszCheckHostVersion, "0"));
    116117        {
    117118            LogRel(("No host version update check performed (disabled).\n"));
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