From: "William N. Zanatta" <william@veritel.com.br>
To: linux-c-programming@vger.kernel.org
Subject: About getopt()
Date: Thu, 08 Aug 2002 11:48:47 -0300 [thread overview]
Message-ID: <3D5284CF.8090708@veritel.com.br> (raw)
Hey,
getopt() does memory allocation for the optarg pointer it sets when a
value for it is found, right?
ok, thus if I'm making something like
char *str;
...
str = optarg;
I'll have to free() str later.
Is that right???
Thanks,
william
--
Perl combines all of the worst aspects of BASIC, C and line noise.
-- Keith Packard
next reply other threads:[~2002-08-08 14:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-08-08 14:48 William N. Zanatta [this message]
2002-08-08 17:41 ` About getopt() Glynn Clements
2002-08-15 14:32 ` finer grained threading? Christopher Quinn
2002-08-15 15:00 ` Christopher Quinn
2002-08-15 15:37 ` Christopher Quinn
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=3D5284CF.8090708@veritel.com.br \
--to=william@veritel.com.br \
--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).