diff options
author | John Keeping <john@keeping.me.uk> | 2013-04-03 21:17:55 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-04-03 21:49:14 +0200 |
commit | 7b96d8880252d70c334857f80ef54009133dbaf3 (patch) | |
tree | 8b3a8c295e512f8cf82f0b32d5e99b0fe3d9667c /bisect.c | |
parent | Git 1.8.0.3 (diff) | |
download | git-7b96d8880252d70c334857f80ef54009133dbaf3.tar.xz git-7b96d8880252d70c334857f80ef54009133dbaf3.zip |
bisect: avoid signed integer overflow
Signed-off-by: John Keeping <john@keeping.me.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'bisect.c')
-rw-r--r-- | bisect.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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; } /* |