linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Bussenius <busseniu@cip.physik.uni-muenchen.de>
To: linux-c-programming@vger.kernel.org
Subject: Re: Nevermind, I'm stupid:  Memory Overright problem.
Date: Wed, 2 Jun 2004 21:11:59 +0200	[thread overview]
Message-ID: <20040602191159.GB28817@opaque> (raw)
In-Reply-To: <1086149906.23026.2.camel@localhost>

Hi,

there is at least one more problem with your program.

>   while(port_ptr && *port_ptr != ':') port_ptr++; //search for ':'

This line will increment port_ptr until it becomes NULL. I guess this is
not what you wanted.

However you should not use perror() all the time to report errors, for
it will print the error string of the most recent system call, which is
--again-- not what you want.

Regards
Christoph

-- 
``There's no dark side of the moon, really
Matter of fact, it's all dark''

--Pink Floyd

      reply	other threads:[~2004-06-02 19:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-02  4:18 Nevermind, I'm stupid: Memory Overright problem John T. Williams
2004-06-02 19:11 ` Christoph Bussenius [this message]

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=20040602191159.GB28817@opaque \
    --to=busseniu@cip.physik.uni-muenchen.de \
    --cc=linux-c-programming@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).