Skip to content

Commit

Permalink
Fix code copy-paste errors discovered by Coverity (#2639)
Browse files Browse the repository at this point in the history
* Fix swapped arguments.

* Fix a copy-paste error.
  • Loading branch information
sergeybykov authored and Attila Hajdrik committed Jan 26, 2017
1 parent 13459c1 commit 8d2eb04
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/OrleansRuntime/GrainDirectory/LocalGrainDirectory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1028,7 +1028,7 @@ public override string ToString()
sb.AppendLine(" Since last call:");
sb.AppendFormat(" Local lookups: {0}", localLookupsDelta).AppendLine();
sb.AppendFormat(" Local found: {0}", localLookupsSucceededDelta).AppendLine();
if (localLookupsCurrent > 0)
if (localLookupsDelta > 0)
sb.AppendFormat(" Hit rate: {0:F1}%", (100.0 * localLookupsSucceededDelta) / localLookupsDelta).AppendLine();

sb.AppendFormat(" Full lookups: {0}", fullLookupsDelta).AppendLine();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ private static MembershipEntry CreateNewMembershipEntry(NodeConfiguration nodeCo

internal void UpdateMyFaultAndUpdateZone(MembershipEntry entry)
{
this.myFaultAndUpdateZones = new UpdateFaultCombo(entry.FaultZone, entry.UpdateZone);
this.myFaultAndUpdateZones = new UpdateFaultCombo(entry.UpdateZone, entry.FaultZone);
}

internal bool TryUpdateStatusAndNotify(MembershipEntry entry)
Expand Down

0 comments on commit 8d2eb04

Please sign in to comment.