1 |
There appears to be a bug in server_test.c: |
2 |
|
3 |
ecos-opt/net/net/common/current/tests/server_test.c |
4 |
|
5 |
94 |
6 |
95 #ifdef CYGPKG_LIBC_STDIO |
7 |
96 sprintf(buf, "Hello %s:%d\n", inet_ntoa(client_addr.sin_addr), ntohs(client_addr.sin_port)); |
8 |
97 #else |
9 |
98 strcpy(buf, "Hello "); |
10 |
99 strcat(buf, inet_ntoa(client_addr.sin_addr)); |
11 |
100 strcat(buf,":"); |
12 |
101 strcat(buf, atoi(ntohs(client_addr.sin_port))); |
13 |
102 strcat(buf,"\n"); |
14 |
103 #endif |
15 |
|
16 |
In line 101, the call to atoi() doesn't look right. |
17 |
Shouldn't that be a call to itoa() (assuming such a function |
18 |
existed)? |
19 |
|
20 |
-- |
21 |
Grant |
22 |
|
23 |
|
24 |
-- |
25 |
gentoo-user@l.g.o mailing list |