Revision e41e0fc6

b/target-i386/cpuid.c
182 182
}
183 183

  
184 184
/* search featureset for flag *[s..e), if found set corresponding bit in
185
 * *pval and return success, otherwise return zero
185
 * *pval and return true, otherwise return false
186 186
 */
187
static int lookup_feature(uint32_t *pval, const char *s, const char *e,
188
    const char **featureset)
187
static bool lookup_feature(uint32_t *pval, const char *s, const char *e,
188
                           const char **featureset)
189 189
{
190 190
    uint32_t mask;
191 191
    const char **ppc;
192
    bool found = false;
192 193

  
193
    for (mask = 1, ppc = featureset; mask; mask <<= 1, ++ppc)
194
    for (mask = 1, ppc = featureset; mask; mask <<= 1, ++ppc) {
194 195
        if (*ppc && !altcmp(s, e, *ppc)) {
195 196
            *pval |= mask;
196
            break;
197
            found = true;
197 198
        }
198
    return (mask ? 1 : 0);
199
    }
200
    return found;
199 201
}
200 202

  
201 203
static void add_flagname_to_bitmaps(const char *flagname, uint32_t *features,

Also available in: Unified diff