public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Grant Edwards <grante@visi.com>
To: gentoo-user@lists.gentoo.org
Subject: [gentoo-user]  Bug in server_test.c
Date: Mon, 24 Mar 2008 14:16:39 +0000 (UTC)	[thread overview]
Message-ID: <fs8d46$9d1$1@ger.gmane.org> (raw)

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



             reply	other threads:[~2008-03-24 14:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-24 14:16 Grant Edwards [this message]
2008-03-24 14:29 ` [gentoo-user] Re: Bug in server_test.c Grant Edwards

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='fs8d46$9d1$1@ger.gmane.org' \
    --to=grante@visi.com \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox