Re: [PATCH RFC] libtracefs: Improve exception handling in instance_alloc()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 10 Mar 2023 18:02:55 +0100
Markus Elfring <Markus.Elfring@xxxxxx> wrote:

> >> How will the chances evolve to integrate the attached change suggestion?
> >>  
> > Everything is initialized to NULL, and free(NULL) is perfectly acceptable.  
> 
> I propose to avoid unnecessary data processing.

No it won't. instance_alloc() is a slow operation, no need to
micro-optimize it.

> 
> 
> 
> > Why complicate the code with more labels than needed?  
> 
> 
> * The control flow can become a bit smaller because a redundant null pointer check
>   will not be performed.
> 
> * Less function calls will be performed in some failure cases.
> 

Who cares?

> 
> 
> > So no, I will not consider this change.  
> 
> I am curious under which circumstances the shown change possibilities will become
> more attractive.

There is none.

-- Steve



[Index of Archives]     [Linux USB Development]     [Linux USB Development]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux