Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'jk/bisect-prn-unsigned'
author
Junio C Hamano
<gitster@pobox.com>
Sun, 7 Apr 2013 21:32:54 +0000
(14:32 -0700)
committer
Junio C Hamano
<gitster@pobox.com>
Sun, 7 Apr 2013 21:32:54 +0000
(14:32 -0700)
* jk/bisect-prn-unsigned:
bisect: avoid signed integer overflow
bisect.c
patch
|
blob
|
history
raw
(from parent 1:
4d35924
)
diff --git
a/bisect.c
b/bisect.c
index bd1b7b5dac81ada592a16630214d1f2cbb655b88..374d9e24bd0a18b0453f3e948db93251a859ba18 100644
(file)
--- a/
bisect.c
+++ b/
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
;
}
/*