public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download: 
* [gentoo-user]  Bug in server_test.c
@ 2008-03-24 14:16 99% Grant Edwards
  0 siblings, 0 replies; 1+ results
From: Grant Edwards @ 2008-03-24 14:16 UTC (permalink / raw
  To: gentoo-user

There appears to be a bug in server_test.c:

ecos-opt/net/net/common/current/tests/server_test.c

    94	
    95	#ifdef CYGPKG_LIBC_STDIO        
    96	        sprintf(buf, "Hello %s:%d\n", inet_ntoa(client_addr.sin_addr), ntohs(client_addr.sin_port));
    97	#else        
    98	        strcpy(buf, "Hello ");
    99	        strcat(buf, inet_ntoa(client_addr.sin_addr));
   100	        strcat(buf,":");
   101	        strcat(buf, atoi(ntohs(client_addr.sin_port)));
   102	        strcat(buf,"\n");
   103	#endif

In line 101, the call to atoi() doesn't look right.
Shouldn't that be a call to itoa() (assuming such a function
existed)?

-- 
Grant


-- 
gentoo-user@lists.gentoo.org mailing list



^ permalink raw reply	[relevance 99%]

Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2008-03-24 14:16 99% [gentoo-user] Bug in server_test.c Grant Edwards

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox