mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 04:38:03 +02:00
svga: Make use of ARRAY_SIZE macro
Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com> Signed-off-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
parent
70d2d3ef7f
commit
82871081fc
2 changed files with 2 additions and 2 deletions
|
|
@ -316,7 +316,7 @@ svga_queue_tss( struct ts_queue *q,
|
|||
unsigned tss,
|
||||
unsigned value )
|
||||
{
|
||||
assert(q->ts_count < sizeof(q->ts)/sizeof(q->ts[0]));
|
||||
assert(q->ts_count < ARRAY_SIZE(q->ts));
|
||||
q->ts[q->ts_count].stage = unit;
|
||||
q->ts[q->ts_count].name = tss;
|
||||
q->ts[q->ts_count].value = value;
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@ const struct sh_opcode_info *svga_opcode_info( uint op )
|
|||
{
|
||||
struct sh_opcode_info *info;
|
||||
|
||||
if (op >= sizeof( opcode_info ) / sizeof( opcode_info[0] )) {
|
||||
if (op >= ARRAY_SIZE(opcode_info)) {
|
||||
/* The opcode is either PHASE, COMMENT, END or out of range.
|
||||
*/
|
||||
assert( 0 );
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue