From 98d299fb3163226547d144ab4bf2290abe7bf7c7 Mon Sep 17 00:00:00 2001 From: Reyk Floeter Date: Fri, 17 Jun 2005 12:51:09 +0000 Subject: remove non-constant array initializers which is a GNU extension. suggested by anil some time ago. --- sys/dev/ic/ar5212.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sys/dev/ic/ar5212.c') diff --git a/sys/dev/ic/ar5212.c b/sys/dev/ic/ar5212.c index 611a363f3d5..2caf3f13470 100644 --- a/sys/dev/ic/ar5212.c +++ b/sys/dev/ic/ar5212.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ar5212.c,v 1.21 2005/05/28 23:45:09 reyk Exp $ */ +/* $OpenBSD: ar5212.c,v 1.22 2005/06/17 12:51:08 reyk Exp $ */ /* * Copyright (c) 2004, 2005 Reyk Floeter @@ -2333,8 +2333,8 @@ ar5k_ar5212_set_key(hal, entry, keyval, mac, xor_notused) const u_int8_t *mac; int xor_notused; { - int elements = AR5K_AR5212_KEYCACHE_SIZE - 2, i; - u_int32_t key_v[elements]; + int i; + u_int32_t key_v[AR5K_AR5212_KEYCACHE_SIZE - 2]; AR5K_ASSERT_ENTRY(entry, AR5K_AR5212_KEYTABLE_SIZE); @@ -2370,7 +2370,7 @@ ar5k_ar5212_set_key(hal, entry, keyval, mac, xor_notused) return (AH_FALSE); } - for (i = 0; i < elements; i++) + for (i = 0; i < AR5K_ELEMENTS(key_v); i++) AR5K_REG_WRITE(AR5K_AR5212_KEYTABLE_OFF(entry, i), key_v[i]); return (ar5k_ar5212_set_key_lladdr(hal, entry, mac)); -- cgit v1.2.3