--- cache.c.orig	Tue Jun 22 14:39:03 1999
+++ cache.c	Tue Jun 22 14:45:58 1999
@@ -151,8 +151,10 @@
 	cii = ITOC(inode);
 	
 	lh = le = &cii->c_cnhead;
-	while ( (le = le->next ) != lh ) {
+	le = le->next;
+	while ( le != lh ) {
 		cc = list_entry(le, struct coda_cache, cc_cnlist);
+		le = le->next;
 		coda_cnremove(cc);
 		coda_ccremove(cc);
 		CODA_FREE(cc, sizeof(*cc));
@@ -175,8 +177,10 @@
 		return;
 
 	lh = le = &sbi->sbi_cchead;
-	while ( (le = le->next ) != lh ) {
+	le = le->next;
+	while ( le != lh ) {
 		cc = list_entry(le, struct coda_cache, cc_cclist);
+		le = le->next;
 		coda_cnremove(cc);
 		coda_ccremove(cc);
 		CODA_FREE(cc, sizeof(*cc));
@@ -199,8 +203,10 @@
 		return;
 
 	lh = le = &sbi->sbi_cchead;
-	while ( (le = le->next ) != lh ) {
+	le = le->next;
+	while ( le != lh ) {
 		cc = list_entry(le, struct coda_cache, cc_cclist);
+		le = le->next;
 		if ( coda_cred_eq(&cc->cc_cred, cred)) {
 			coda_cnremove(cc);
 			coda_ccremove(cc);

