[sheepdog] [PATCH] minor: fixed indention problem in sheep/journal.c

Liu Yuan namei.unix at gmail.com
Mon Jul 22 14:28:55 CEST 2013


On Mon, Jul 22, 2013 at 09:10:27PM +0900, MORITA Kazutaka wrote:
> At Sun, 21 Jul 2013 22:37:42 -0700,
> Kai Zhang wrote:
> > 
> > Signed-off-by: Kai Zhang <kyle at zelin.io>
> > ---
> >  sheep/journal.c |    4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/sheep/journal.c b/sheep/journal.c
> > index 016f9da..990ef94 100644
> > --- a/sheep/journal.c
> > +++ b/sheep/journal.c
> > @@ -143,7 +143,7 @@ static int replay_journal_entry(struct journal_descriptor *jd)
> >  	char *p = (char *)jd;
> >  
> >  	snprintf(path, PATH_MAX, "%s/%016"PRIx64,
> > -		md_get_object_path(jd->oid), jd->oid);
> > +		 md_get_object_path(jd->oid), jd->oid);
> >  
> >  	if (jd->flag == JF_REMOVE_OBJ) {
> >  		sd_iprintf("%s (remove)", path);
> > @@ -153,7 +153,7 @@ static int replay_journal_entry(struct journal_descriptor *jd)
> >  	}
> >  
> >  	sd_iprintf("%s, size %"PRIu64", off %"PRIu64", %d",
> > -		path, jd->size, jd->offset, jd->create);
> > +		   path, jd->size, jd->offset, jd->create);
> >  
> >  	if (jd->create)
> >  		flags |= O_CREAT;
> 
> Is this change correct?  We follow the Linux kernel coding style, and
> it says that "spaces are never used for indentation".  Anyway, I don't
> intend to be too strict about the coding style and, IMHO, both look
> good to me.

I think both is correct. Many source files in Linux kernel align the parameters
to the left parentheses. I think we can add a check of this in our checkscript
to allow only one style. (I am in support of aligning para to parentthese).

Thanks
Yuan



More information about the sheepdog mailing list