gallium/tests: use ARRAY_SIZE macro

Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
Eric Engestrom 2017-09-06 11:33:15 +01:00
parent db8c5ae853
commit f77d06fb28
3 changed files with 9 additions and 3 deletions

View File

@ -7,6 +7,8 @@
#include "graw_util.h"
#include "util/macros.h"
static int width = 300;
static int height = 300;
@ -44,7 +46,7 @@ static struct vertex vertices[] =
}
};
#define NUM_VERTS (sizeof(vertices) / sizeof(vertices[0]))
#define NUM_VERTS ARRAY_SIZE(vertices)
static void

View File

@ -5,6 +5,8 @@
#include "graw_util.h"
#include "util/macros.h"
static int width = 300;
static int height = 300;
@ -65,7 +67,7 @@ static struct vertex vertices[] =
},
};
#define NUM_VERTS (sizeof(vertices) / sizeof(vertices[0]))
#define NUM_VERTS ARRAY_SIZE(vertices)

View File

@ -7,6 +7,8 @@
#include "graw_util.h"
#include "util/macros.h"
static int width = 300;
static int height = 300;
@ -69,7 +71,7 @@ static struct vertex vertices[] =
},
};
#define NUM_VERTS (sizeof(vertices) / sizeof(vertices[0]))
#define NUM_VERTS ARRAY_SIZE(vertices)