[patch] SELinux: trivial, unify iterator variable naming, part 3

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

Once again, renamed iterators "idx" to "i", to be in harmony
with the old unwritten C convention, and with the rest of the code.

Signed-off-by: Vesa-Matti Kari <vmkari@xxxxxxxxxxxxxx>

---

 security/selinux/netif.c |   16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)



--- security-testing-2.6/security/selinux/netif.c	2008-07-20 18:29:22.000000000 +0300
+++ security-testing-2.6-vmk2/security/selinux/netif.c	2008-07-21 02:17:42.000000000 +0300
@@ -67,10 +67,10 @@ static inline u32 sel_netif_hashfn(int i
  */
 static inline struct sel_netif *sel_netif_find(int ifindex)
 {
-	int idx = sel_netif_hashfn(ifindex);
+	int i = sel_netif_hashfn(ifindex);
 	struct sel_netif *netif;

-	list_for_each_entry_rcu(netif, &sel_netif_hash[idx], list)
+	list_for_each_entry_rcu(netif, &sel_netif_hash[i], list)
 		/* all of the devices should normally fit in the hash, so we
 		 * optimize for that case */
 		if (likely(netif->nsec.ifindex == ifindex))
@@ -90,13 +90,13 @@ static inline struct sel_netif *sel_neti
  */
 static int sel_netif_insert(struct sel_netif *netif)
 {
-	int idx;
+	int i;

 	if (sel_netif_total >= SEL_NETIF_HASH_MAX)
 		return -ENOSPC;

-	idx = sel_netif_hashfn(netif->nsec.ifindex);
-	list_add_rcu(&netif->list, &sel_netif_hash[idx]);
+	i = sel_netif_hashfn(netif->nsec.ifindex);
+	list_add_rcu(&netif->list, &sel_netif_hash[i]);
 	sel_netif_total++;

 	return 0;
@@ -257,12 +257,12 @@ static void sel_netif_kill(int ifindex)
  */
 static void sel_netif_flush(void)
 {
-	int idx;
+	int i;
 	struct sel_netif *netif;

 	spin_lock_bh(&sel_netif_lock);
-	for (idx = 0; idx < SEL_NETIF_HASH_SIZE; idx++)
-		list_for_each_entry(netif, &sel_netif_hash[idx], list)
+	for (i = 0; i < SEL_NETIF_HASH_SIZE; i++)
+		list_for_each_entry(netif, &sel_netif_hash[i], list)
 			sel_netif_destroy(netif);
 	spin_unlock_bh(&sel_netif_lock);
 }

--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@xxxxxxxxxxxxx with
the words "unsubscribe selinux" without quotes as the message.

[Index of Archives]     [Selinux Refpolicy]     [Linux SGX]     [Fedora Users]     [Fedora Desktop]     [Yosemite Photos]     [Yosemite Camping]     [Yosemite Campsites]     [KDE Users]     [Gnome Users]

  Powered by Linux