public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Brian Norris <computersforpeace@gmail.com>
To: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
Cc: richard@nod.at, dedekind1@gmail.com, linux-mtd@lists.infradead.org
Subject: Re: [PATCH] ubifs: correct the size of nnode in memset
Date: Wed, 19 Aug 2015 09:29:47 -0700	[thread overview]
Message-ID: <20150819162947.GW60523@google.com> (raw)
In-Reply-To: <1439972932-12116-1-git-send-email-yangds.fnst@cn.fujitsu.com>

On Wed, Aug 19, 2015 at 04:28:52PM +0800, Dongsheng Yang wrote:
> There is a typo in lpt to memset nnode by the
> size in sizeof(stuct ubifs_pnode).
> 
> Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>

Pushed to mtd-utils.git, as it's obvious. Good catch!

I'll take a look at your restructuring patches eventually. But I'll
usually just defer UBIFS stuff to Richard/Artem/others.

> ---
>  mkfs.ubifs/lpt.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mkfs.ubifs/lpt.c b/mkfs.ubifs/lpt.c
> index f6d4352..6aa0b88 100644
> --- a/mkfs.ubifs/lpt.c
> +++ b/mkfs.ubifs/lpt.c
> @@ -384,7 +384,7 @@ int create_lpt(struct ubifs_info *c)
>  		goto out;
>  	}
>  	memset(pnode, 0 , sizeof(struct ubifs_pnode));
> -	memset(nnode, 0 , sizeof(struct ubifs_pnode));
> +	memset(nnode, 0 , sizeof(struct ubifs_nnode));

FWIW, struct ubifs_pnode and struct ubifs_nnode look like they would be
the same size when using 32-bit pointers, but a bit different (see the
third field in structs ubifs_nbranch and ubifs_lprops) with 64-bit.

>  
>  	c->lscan_lnum = c->main_first;
>  
> -- 
> 1.8.4.2

Brian

  reply	other threads:[~2015-08-19 16:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-19  8:28 [PATCH] ubifs: correct the size of nnode in memset Dongsheng Yang
2015-08-19 16:29 ` Brian Norris [this message]
2015-08-20  3:06   ` Dongsheng Yang

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=20150819162947.GW60523@google.com \
    --to=computersforpeace@gmail.com \
    --cc=dedekind1@gmail.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=richard@nod.at \
    --cc=yangds.fnst@cn.fujitsu.com \
    /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