packages/net/netcat/patches/001-netcat_flag_count.patch
Ilya Lipnitskiy 5d8d4fbbcb
treewide: Run refresh on all packages
The crude loop I wrote to come up with this changeset:

  find -L package/feeds/packages/ -name patches | \
  sed 's/patches$/refresh/' | sort | xargs make

Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
2021-02-20 16:02:15 -08:00

20 lines
531 B
Diff

--- a/src/flagset.c
+++ b/src/flagset.c
@@ -134,7 +134,7 @@ unsigned short netcat_flag_next(unsigned
int netcat_flag_count(void)
{
- register char c;
+ register unsigned char c;
register int i;
int ret = 0;
@@ -154,7 +154,7 @@ int netcat_flag_count(void)
Assumed that the bit number 1 is the sign, and that we will shift the
bit 1 (or the bit that takes its place later) until the the most right,
WHY it has to keep the wrong sign? */
- ret -= (c >> 7);
+ ret += (c >> 7);
c <<= 1;
}
}