FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 03-24-2008, 01:16 PM
Grant Edwards
 
Default Bug in server_test.c

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
", 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,"
");
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
 
Old 03-24-2008, 01:29 PM
Grant Edwards
 
Default Bug in server_test.c

Oops. Wrong group...

On 2008-03-24, Grant Edwards <grante@visi.com> wrote:
> There appears to be a bug in server_test.c:
>
> ecos-opt/net/net/common/current/tests/server_test.c

--
Grant


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

Thread Tools




All times are GMT. The time now is 10:56 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org