From: Simon Wilkinson Date: Tue, 12 Feb 2013 13:04:01 +0000 (+0000) Subject: rx: Fix wrong loop iterator in rx_clearProcessRPCStats X-Git-Tag: upstream/1.8.0_pre1^2~1453 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=cb8a103cb73aaa229ba34abc1b9704ab7ad5ba02;p=packages%2Fo%2Fopenafs.git 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 --- diff --git a/src/rx/rx.c b/src/rx/rx.c index 5113ac50a..36ad89fc3 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++) {