Skip to content

Commit 7b96d88

Browse files
johnkeepinggitster
authored andcommitted
bisect: avoid signed integer overflow
Signed-off-by: John Keeping <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 1599999 commit 7b96d88

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bisect.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -525,9 +525,9 @@ struct commit_list *filter_skipped(struct commit_list *list,
525525
* is increased by one between each call, but that should not matter
526526
* for this application.
527527
*/
528-
static int get_prn(int count) {
528+
static unsigned get_prn(unsigned count) {
529529
count = count * 1103515245 + 12345;
530-
return ((unsigned)(count/65536) % PRN_MODULO);
530+
return (count/65536) % PRN_MODULO;
531531
}
532532

533533
/*

0 commit comments

Comments
 (0)