File: 50_signed_abs.patch

package info (click to toggle)
ht 2.1.0%2Brepack1-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 5,796 kB
  • ctags: 15,915
  • sloc: cpp: 88,932; ansic: 12,693; sh: 4,081; lex: 226; makefile: 184; yacc: 128
file content (15 lines) | stat: -rw-r--r-- 295 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Description: Force unambiguous signed abs()
Author: Stephen Kitt <skitt@debian.org>
Last-Update: 2017-08-11

--- a/htapp.cc
+++ b/htapp.cc
@@ -3023,7 +3023,7 @@
 {
 	uint a = 2;
 	uint b = u/a;
-	while (abs(a - b) > 1) {
+	while (abs((int) (a - b)) > 1) {
 		a = (a+b)/2;
 		b = u/a;
         }