VirtualBox

Ignore:
Timestamp:
Nov 26, 2009 2:42:59 PM (15 years ago)
Author:
vboxsync
Message:

IPRT: Optimized version of RTStrVersionCompare (thanks to Knut!), made it behave like strcmp().

File:
1 edited

Legend:

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

    r24898 r25005  
    133133    if (RT_SUCCESS(rc) && *pfUpdate)
    134134    {
    135         uint8_t u8Res;
    136         rc = RTStrVersionCompare(*ppszHostVersion, *ppszGuestVersion, &u8Res);
    137         if (RT_FAILURE(rc))
    138             LogFlow(("Error while comparing host versions! %s <-> %s, rc = %Rrc\n",
    139                 *ppszHostVersion, *ppszGuestVersion, rc));
    140 
    141         if (u8Res == 1) /* Is host version greater than guest add version? */
     135        if (RTStrVersionCompare(*ppszHostVersion, *ppszGuestVersion) == 1) /* Is host version greater than guest add version? */
    142136        {
    143137            /* Yay, we have an update! */
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