Changeset 24666 in vbox for trunk/include
- Timestamp:
- Nov 14, 2009 11:57:02 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/HostServices/GuestPropertySvc.h
r22173 r24666 125 125 DECLINLINE(int) validateFlags(const char *pcszFlags, uint32_t *pfFlags) 126 126 { 127 const static uint32_t sFlagList[] =127 static const uint32_t s_aFlagList[] = 128 128 { 129 129 TRANSIENT, READONLY, RDONLYGUEST, RDONLYHOST … … 141 141 { 142 142 unsigned i = 0; 143 for (; i < RT_ELEMENTS(sFlagList); ++i) 144 if (RTStrNICmp(pcszNext, flagName(sFlagList[i]), 145 flagNameLen(sFlagList[i]) 146 ) == 0 147 ) 143 for (; i < RT_ELEMENTS(s_aFlagList); ++i) 144 if (RTStrNICmp(pcszNext, flagName(s_aFlagList[i]), 145 flagNameLen(s_aFlagList[i])) == 0) 148 146 break; 149 if (RT_ELEMENTS(s FlagList) == i)147 if (RT_ELEMENTS(s_aFlagList) == i) 150 148 rc = VERR_PARSE_ERROR; 151 149 else 152 150 { 153 fFlags |= s FlagList[i];154 pcszNext += flagNameLen(s FlagList[i]);151 fFlags |= s_aFlagList[i]; 152 pcszNext += flagNameLen(s_aFlagList[i]); 155 153 while (' ' == *pcszNext) 156 154 ++pcszNext; … … 178 176 DECLINLINE(int) writeFlags(uint32_t fFlags, char *pszFlags) 179 177 { 180 const static uint32_t sFlagList[] =178 static const uint32_t s_aFlagList[] = 181 179 { 182 180 TRANSIENT, READONLY, RDONLYGUEST, RDONLYHOST … … 190 188 { 191 189 unsigned i = 0; 192 for (; i < RT_ELEMENTS(s FlagList); ++i)190 for (; i < RT_ELEMENTS(s_aFlagList); ++i) 193 191 { 194 if (s FlagList[i] == (fFlags & sFlagList[i]))192 if (s_aFlagList[i] == (fFlags & s_aFlagList[i])) 195 193 { 196 strcpy(pszNext, flagName(s FlagList[i]));197 pszNext += flagNameLen(s FlagList[i]);198 fFlags &= ~s FlagList[i];194 strcpy(pszNext, flagName(s_aFlagList[i])); 195 pszNext += flagNameLen(s_aFlagList[i]); 196 fFlags &= ~s_aFlagList[i]; 199 197 if (fFlags != NILFLAG) 200 198 {
Note:
See TracChangeset
for help on using the changeset viewer.