[Devel] Re: [PATCH] [RFC] Factor out shared portion of [_]ckpt_read_obj

Oren Laadan orenl at librato.com
Wed Oct 28 18:03:21 PDT 2009



Serge E. Hallyn wrote:
> Quoting Matt Helsley (matthltc at us.ibm.com):
>> It looked like a portion of one of these functions was missing
>> the block "dispatching" errors so I factored this section out
>> and called it from both functions. Was there a good reason it
>> was missing?
>>
>> Signed-off-by: Matt Helsley <matthltc at us.ibm.com>
> 
> Good catch, but wouldn't it be better to instead factor the code
> from label again: up to
> 
> 	/* if len specified, enforce, else if maximum specified, enforce */
> 	if ((len && h->len != len) || (!len && max && h->len > max))
> 		return -EINVAL;
> 
> out of both into one function?  This feels more artificial, and I don't
> see any other meaningful differences.
> 

Yes, I'll do just that.
(Thanks for the fix, Matt).

Oren.

_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers




More information about the Devel mailing list