bisect: avoid signed integer overflow

Signed-off-by: John Keeping <john@keeping.me.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>

John Keeping committed Apr 3, 2013 at 20:17 UTC 7b96d8880252d70c334857f80ef54009133dbaf3
1 file changed +2 -2
bisect.c
+2 -2
@@ -525,9 +525,9 @@ struct commit_list *filter_skipped(struct commit_list *list,
525 * is increased by one between each call, but that should not matter
526 * for this application.
527 */
528 -static int get_prn(int count) {
528 +static unsigned get_prn(unsigned count) {
529 count = count * 1103515245 + 12345;
530 - return ((unsigned)(count/65536) % PRN_MODULO);
530 + return (count/65536) % PRN_MODULO;
531 }
532
533 /*