Skip to content

Commit

Permalink
Auto merge of #43588 - dns2utf8:wrapping_add, r=sfackler
Browse files Browse the repository at this point in the history
Use explicit wrapping_add …

… to prevent potential unexpected behavior on debug builds.
  • Loading branch information
bors committed Aug 9, 2017
2 parents 3f977ba + 702750c commit c2de81f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libstd/sync/barrier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ impl Barrier {
BarrierWaitResult(false)
} else {
lock.count = 0;
lock.generation_id += 1;
lock.generation_id = lock.generation_id.wrapping_add(1);
self.cvar.notify_all();
BarrierWaitResult(true)
}
Expand Down

0 comments on commit c2de81f

Please sign in to comment.