branch Attitude Adjustment packages
[12.09/packages.git] / net / netcat / patches / 001-netcat_flag_count.patch
1 Index: netcat-0.7.1/src/flagset.c
2 ===================================================================
3 --- netcat-0.7.1.orig/src/flagset.c     2009-02-06 19:56:01.000000000 +0100
4 +++ netcat-0.7.1/src/flagset.c  2009-02-06 19:56:13.000000000 +0100
5 @@ -134,7 +134,7 @@
6  
7  int netcat_flag_count(void)
8  {
9 -  register char c;
10 +  register unsigned char c;
11    register int i;
12    int ret = 0;
13  
14 @@ -154,7 +154,7 @@
15         Assumed that the bit number 1 is the sign, and that we will shift the
16         bit 1 (or the bit that takes its place later) until the the most right,
17         WHY it has to keep the wrong sign? */
18 -      ret -= (c >> 7);
19 +      ret += (c >> 7);
20        c <<= 1;
21      }
22    }