Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
bisect: avoid signed integer overflow
author
John Keeping
<john@keeping.me.uk>
Wed, 3 Apr 2013 19:17:55 +0000
(20:17 +0100)
committer
Junio C Hamano
<gitster@pobox.com>
Wed, 3 Apr 2013 19:49:14 +0000
(12:49 -0700)
Signed-off-by: John Keeping <john@keeping.me.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
bisect.c
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
1599999
)
diff --git
a/bisect.c
b/bisect.c
index 1aad49b1a642a308f449001960958ccab79347d1..7f95273e699418bd8a4c11ed6491eb8b6da434dc 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
;
}
/*