Skip to content

Commit 23589a9

Browse files
committed
Merge branch 'jk/bisect-prn-unsigned' into maint
* jk/bisect-prn-unsigned: bisect: avoid signed integer overflow
2 parents cd12104 + 7b96d88 commit 23589a9

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)