lkml.org 
[lkml]   [2019]   [Feb]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 -next] btrfs: Remove unnecessary casts in btrfs_read_root_item
On Wed, Feb 20, 2019 at 12:32:02PM +0000, YueHaibing wrote:
> There is a messy cast here:
> min_t(int, len, (int)sizeof(*item)));
>
> min_t() should normally cast to unsigned. It's not possible for
> "len" to be negative, but if it were then we definitely
> wouldn't want to pass negatives to read_extent_buffer(). Also there
> is an extra cast.
>
> This patch shouldn't affect runtime, it's just a clean up.
>
> Suggested-by: Dan Carpenter <dan.carpenter@oracle.com>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

Applied, thanks.

\
 
 \ /
  Last update: 2019-02-22 15:38    [W:0.142 / U:0.940 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site