blob: dd1938a9911a44a76d547c92defb398e82a42a5f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
Make netcat_flag_count() return positive value
C language has 3 distinct char types:
char
unsigned char
signed char
A char has the same range of values as signed char on X86,
but same as unsigned char on PPC which made netcat_flag_count
return a negative value, now we force variable c as signed char
to make netcat_flag_count return positive value.
Upstream-Status: Pending
Signed-off-by: Roy.Li <rongqing.li@windriver.com>
---
src/flagset.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/flagset.c b/src/flagset.c
index 442b634..54ac898 100644
--- a/src/flagset.c
+++ b/src/flagset.c
@@ -134,7 +134,7 @@ unsigned short netcat_flag_next(unsigned short port)
int netcat_flag_count(void)
{
- register char c;
+ register signed char c;
register int i;
int ret = 0;
--
1.7.5.4
|