Permalink
Browse files

Merge branch 'jk/bisect-prn-unsigned' into jch

* jk/bisect-prn-unsigned:
  bisect: avoid signed integer overflow
  • Loading branch information...
2 parents 7b991de + 7b96d88 commit 24d72b76e9b4523b877cba5ad26004735b163efb @gitster gitster committed Apr 4, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 bisect.c
View
4 bisect.c
@@ -525,9 +525,9 @@ struct commit_list *filter_skipped(struct commit_list *list,
* is increased by one between each call, but that should not matter
* for this application.
*/
-static int get_prn(int count) {
+static unsigned get_prn(unsigned count) {
count = count * 1103515245 + 12345;
- return ((unsigned)(count/65536) % PRN_MODULO);
+ return (count/65536) % PRN_MODULO;
}
/*

0 comments on commit 24d72b7

Please sign in to comment.