VirtualBox

Ignore:
Timestamp:
Jan 10, 2025 4:52:48 PM (10 days ago)
Author:
vboxsync
Message:

Runtime/common/string/strtonum.cpp: Remove redundant conditions in if, bugref:3409

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/string/strtonum.cpp

    r107429 r107694  
    161161        if (psz[0] == '0')
    162162        {
    163             if (   psz[0] == '0'
    164                 && cchMax > 1
     163            if (   cchMax > 1
    165164                && (psz[1] == 'x' || psz[1] == 'X')
    166165                && g_auchDigits[(unsigned char)psz[2]] < 16)
     
    170169                cchMax   -= 2;
    171170            }
    172             else if (   psz[0] == '0'
    173                      && g_auchDigits[(unsigned char)psz[1]] < 8)
     171            else if (g_auchDigits[(unsigned char)psz[1]] < 8)
    174172                uBase = 8; /* don't skip the zero, in case it's alone. */
    175173        }
     
    461459                cchMax   -= 2;
    462460            }
    463             else if (   psz[0] == '0'
    464                      && g_auchDigits[(unsigned char)psz[1]] < 8)
     461            else if (g_auchDigits[(unsigned char)psz[1]] < 8)
    465462                uBase = 8; /* don't skip the zero, in case it's alone. */
    466463        }
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