public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: 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:16 -0400	[thread overview]
Message-ID: <200908130136.16712.vapier@gentoo.org> (raw)
In-Reply-To: <364299f40907182138w484cc898gac9fe00dbde75afd@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 838 bytes --]

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

[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 355 bytes --]

------------------------------------------------------------------------------
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

[-- Attachment #3: Type: text/plain, Size: 155 bytes --]

_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

  parent reply	other threads:[~2009-08-13  5: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 [this message]
2009-08-13  8:36   ` Garrett Cooper

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=200908130136.16712.vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --cc=ltp-list@lists.sourceforge.net \
    /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