Linux Container Development
 help / color / mirror / Atom feed
From: Oren Laadan <orenl-RdfvBDnrOixBDgjK7y7TUQ@public.gmane.org>
To: "Serge E. Hallyn" <serue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
Cc: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
Subject: Re: [PATCH] [RFC] Factor out shared portion of [_]ckpt_read_obj
Date: Wed, 28 Oct 2009 21:03:21 -0400	[thread overview]
Message-ID: <4AE8E9D9.5010304@librato.com> (raw)
In-Reply-To: <20091028203504.GA26291-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>



Serge E. Hallyn wrote:
> Quoting Matt Helsley (matthltc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org):
>> 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-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
> 
> 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.

  parent reply	other threads:[~2009-10-29  1:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-28  6:13 [PATCH] [RFC] Factor out shared portion of [_]ckpt_read_obj Matt Helsley
     [not found] ` <1256710435-3266-1-git-send-email-matthltc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-10-28 20:35   ` Serge E. Hallyn
     [not found]     ` <20091028203504.GA26291-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-10-29  1:03       ` Oren Laadan [this message]
2009-10-29 17:50   ` [PATCH] c/r: factor out objref handling from {_,}ckpt_read_obj() Oren Laadan
     [not found]     ` <1256838612-17372-1-git-send-email-orenl-RdfvBDnrOixBDgjK7y7TUQ@public.gmane.org>
2009-10-29 19:52       ` Serge E. Hallyn
     [not found]         ` <20091029195213.GA29874-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-10-29 21:21           ` Matt Helsley
2009-10-29 21:30       ` Matt Helsley

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=4AE8E9D9.5010304@librato.com \
    --to=orenl-rdfvbdnroixbdgjk7y7tuq@public.gmane.org \
    --cc=containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=serue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org \
    /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