struct dri_extension_match *matches, size_t num_matches,
const __DRIextension **extensions)
{
- int i, j;
bool ret = true;
void *field;
- for (i = 0; extensions[i]; i++) {
- for (j = 0; j < num_matches; j++) {
+ for (size_t i = 0; extensions[i]; i++) {
+ for (size_t j = 0; j < num_matches; j++) {
if (strcmp(extensions[i]->name, matches[j].name) == 0 &&
extensions[i]->version >= matches[j].version) {
field = ((char *) dri + matches[j].offset);
}
}
- for (j = 0; j < num_matches; j++) {
+ for (size_t j = 0; j < num_matches; j++) {
field = ((char *) dri + matches[j].offset);
if ((*(const __DRIextension **) field == NULL) && !matches[j].optional) {
ret = false;
static int
gbm_format_to_dri_format(uint32_t gbm_format)
{
- int i;
-
gbm_format = gbm_format_canonicalize(gbm_format);
- for (i = 0; i < ARRAY_SIZE(gbm_dri_visuals_table); i++) {
+ for (size_t i = 0; i < ARRAY_SIZE(gbm_dri_visuals_table); i++) {
if (gbm_dri_visuals_table[i].gbm_format == gbm_format)
return gbm_dri_visuals_table[i].dri_image_format;
}
static uint32_t
gbm_dri_to_gbm_format(int dri_format)
{
- int i;
-
- for (i = 0; i < ARRAY_SIZE(gbm_dri_visuals_table); i++) {
+ for (size_t i = 0; i < ARRAY_SIZE(gbm_dri_visuals_table); i++) {
if (gbm_dri_visuals_table[i].dri_image_format == dri_format)
return gbm_dri_visuals_table[i].gbm_format;
}