From: Cyril Hrubis <[email protected]>
Subject: Re: [LTP] [[email protected]: Re: [PATCH] fix missing return in several 
files.]
Date: Tue, 2 Jun 2009 02:14:51 +0200

> Hi,
>> Well, in this case, tst_brkm() looks like unnecessary here.
>> 
>>    /*
>>     * If no cleanup function was specified, just return to the caller.
>>     * Otherwise call the specified function.  If specified function
>>     * returns, call tst_exit().
>>     */
>>    if ( func != NULL ) {
>>       (*func)();
>>       tst_exit();
>>    }
>> 
>> The tst_exit() you just added will not be called anyway.
> 
> I'm passing NULL to tst_brkm, so we should never enter this code.  But
> tst_brkm() calls tst_exit() in some circumstances so we should either add
> __atribute__ ((noreturn)) to tst_brkm too or remove tst_exit() from it.
> 

OK. How about we do,

        tst_resm(TCONF, "libaio missing");
        tst_exit();

instead of,

        tst_brkm(TCONF, NULL, "libaio missing");
        tst_exit();

since I can't see the reason to use tst_brkm() in this case?

CAI Qian

------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to