Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1212431 > unrolled thread

[PATCH] btrfs: Fixed declaration of old_len

Started byAlexandru Moise <00moses.alexander00@gmail.com>
First post2015-08-24 21:00 +0200
Last post2015-08-25 17:20 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] btrfs: Fixed declaration of old_len Alexandru Moise <00moses.alexander00@gmail.com> - 2015-08-24 21:00 +0200
    Re: [PATCH] btrfs: Fixed declaration of old_len David Sterba <dsterba@suse.cz> - 2015-08-25 17:20 +0200

#1212431 — [PATCH] btrfs: Fixed declaration of old_len

FromAlexandru Moise <00moses.alexander00@gmail.com>
Date2015-08-24 21:00 +0200
Subject[PATCH] btrfs: Fixed declaration of old_len
Message-ID<q158n-7Qs-35@gated-at.bofh.it>
old_len is used to store the return value of btrfs_item_size_nr().
The return value of btrfs_item_size_nr() is of type u32.
To improve code correctness and avoid mixing signed and unsigned
integers I've changed old_len to be of type u32 as well.

Signed-off-by: Alexandru Moise <00moses.alexander00@gmail.com>
---
 fs/btrfs/root-tree.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/btrfs/root-tree.c b/fs/btrfs/root-tree.c
index 360a728..024ea4f 100644
--- a/fs/btrfs/root-tree.c
+++ b/fs/btrfs/root-tree.c
@@ -141,7 +141,7 @@ int btrfs_update_root(struct btrfs_trans_handle *trans, struct btrfs_root
 	int ret;
 	int slot;
 	unsigned long ptr;
-	int old_len;
+	u32 old_len;
 
 	path = btrfs_alloc_path();
 	if (!path)
-- 
2.5.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1213106

FromDavid Sterba <dsterba@suse.cz>
Date2015-08-25 17:20 +0200
Message-ID<q1ob0-1NF-19@gated-at.bofh.it>
In reply to#1212431
On Mon, Aug 24, 2015 at 09:56:28PM +0000, Alexandru Moise wrote:
> old_len is used to store the return value of btrfs_item_size_nr().
> The return value of btrfs_item_size_nr() is of type u32.
> To improve code correctness and avoid mixing signed and unsigned
> integers I've changed old_len to be of type u32 as well.
> 
> Signed-off-by: Alexandru Moise <00moses.alexander00@gmail.com>

Reviewed-by: David Sterba <dsterba@suse.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web