On Wed, Aug 12, 2009 at 10:36 PM, Mike Frysinger<[email protected]> 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
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to