From cb8a103cb73aaa229ba34abc1b9704ab7ad5ba02 Mon Sep 17 00:00:00 2001 From: Simon Wilkinson Date: Tue, 12 Feb 2013 13:04:01 +0000 Subject: [PATCH] rx: Fix wrong loop iterator in rx_clearProcessRPCStats Fix the use of an incorrect variable as loop iterator which would have resulted in a crash. Caught by clang analyzer. Change-Id: I785d06b9be0915bc540c37b43d1001a562a7cde4 Reviewed-on: http://gerrit.openafs.org/9202 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman --- src/rx/rx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rx/rx.c b/src/rx/rx.c index 5113ac50a5..36ad89fc35 100644 --- a/src/rx/rx.c +++ b/src/rx/rx.c @@ -9124,7 +9124,7 @@ rx_clearProcessRPCStats(afs_uint32 clearFlag) for (opr_queue_Scan(&processStats, cursor)) { unsigned int num_funcs = 0, i; struct rx_interface_stat *rpc_stat - = opr_queue_Entry(rpc_stat, struct rx_interface_stat, entry); + = opr_queue_Entry(cursor, struct rx_interface_stat, entry); num_funcs = rpc_stat->stats[0].func_total; for (i = 0; i < num_funcs; i++) {