From: Garrett Cooper <yanegomi@gmail.com>
To: Mike Frysinger <vapier@gentoo.org>
Cc: ltp-list@lists.sourceforge.net
Subject: Re: [LTP] [PATCH] Fix bad strerror calls in testcases/kernel/syscalls/waitid01.c
Date: Thu, 13 Aug 2009 01:36:25 -0700 [thread overview]
Message-ID: <364299f40908130136m7a7d389k207cb3d5f2a2dd53@mail.gmail.com> (raw)
In-Reply-To: <200908130136.16712.vapier@gentoo.org>
On Wed, Aug 12, 2009 at 10:36 PM, Mike Frysinger<vapier@gentoo.org> wrote:
> On Sunday 19 July 2009 00:38:39 Garrett Cooper wrote:
>> int errnochoose(void){ //choose the relative errno
>>
>> switch (TEST_ERRNO){
>> - case 0: tst_exit();
>> - case ECHILD: strerror((int)"ECHILD");
>> - break;
>> - case EINTR: strerror((int)"EINTR");
>> - break;
>> - case EINVAL: strerror((int)"EINVAL");
>> - break;
>> - default: strerror((int)"Other Error");
>> + case 0: tst_exit();
>> + break;
>> + default: strerror(TEST_ERRNO);
>> break;
>> }
>
> maybe i'm missing something, but strerror() doesnt write any output, it
> returns a string. so ignoring the return value of strerror() makes it
> pointless. which means this whole function is useless ?
> -mike
Yes, you're absolutely correct now that I think about it. perror(3)
would be a whole different beast...
Thanks,
-Garrett
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
prev parent reply other threads:[~2009-08-13 8:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-19 4:38 [LTP] [PATCH] Fix bad strerror calls in testcases/kernel/syscalls/waitid01.c Garrett Cooper
2009-07-30 12:44 ` Subrata Modak
2009-08-13 5:36 ` Mike Frysinger
2009-08-13 8:36 ` Garrett Cooper [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=364299f40908130136m7a7d389k207cb3d5f2a2dd53@mail.gmail.com \
--to=yanegomi@gmail.com \
--cc=ltp-list@lists.sourceforge.net \
--cc=vapier@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