VirtualBox

Changeset 17088 in vbox for trunk/src/VBox/Runtime/common


Ignore:
Timestamp:
Feb 24, 2009 6:37:53 PM (16 years ago)
Author:
vboxsync
Message:

RTGetOpt: uShort -> iShort and int.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/misc/getopt.cpp

    r17087 r17088  
    3737#include <iprt/assert.h>
    3838#include <iprt/ctype.h>
    39 #include <limits.h>
    4039
    4140
     
    5756    {
    5857        Assert(!(paOptions[i].fFlags & ~RTGETOPT_VALID_MASK));
    59         Assert(paOptions[i].uShort > 0 && paOptions[i].uShort <= (unsigned)INT_MAX);
     58        Assert(paOptions[i].iShort > 0);
    6059
    6160        bool fShort = *pszArgThis == '-'
    62                     && (uint32_t)pszArgThis[1] == paOptions[i].uShort
    63                     && paOptions[i].uShort;
     61                    && (uint32_t)pszArgThis[1] == paOptions[i].iShort;
    6462
    6563        if ((paOptions[i].fFlags & RTGETOPT_REQ_MASK) != RTGETOPT_REQ_NOTHING)
     
    180178                        return VERR_INTERNAL_ERROR;
    181179                }
    182                 return paOptions[i].uShort;
     180                return paOptions[i].iShort;
    183181            }
    184182        }
     
    190188        {
    191189            pValueUnion->pDef = &paOptions[i];
    192             return (int)paOptions[i].uShort;
     190            return paOptions[i].iShort;
    193191        }
    194192    }
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