Skip to content

Commit

Permalink
crush: fix using plain integer as NULL warning
Browse files Browse the repository at this point in the history
Fixes the following sparse warnings:

net/ceph/crush/mapper.c:517:76: warning: Using plain integer as NULL pointer
net/ceph/crush/mapper.c:728:68: warning: Using plain integer as NULL pointer

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
  • Loading branch information
YueHaibing authored and Ilya Dryomov committed Aug 13, 2018
1 parent bad8721 commit 4de17ae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/ceph/crush/mapper.c
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ static int crush_choose_firstn(const struct crush_map *map,
in, work->work[-1-in->id],
x, r,
(choose_args ?
&choose_args[-1-in->id] : 0),
&choose_args[-1-in->id] : NULL),
outpos);
if (item >= map->max_devices) {
dprintk(" bad item %d\n", item);
Expand Down Expand Up @@ -725,7 +725,7 @@ static void crush_choose_indep(const struct crush_map *map,
in, work->work[-1-in->id],
x, r,
(choose_args ?
&choose_args[-1-in->id] : 0),
&choose_args[-1-in->id] : NULL),
outpos);
if (item >= map->max_devices) {
dprintk(" bad item %d\n", item);
Expand Down

0 comments on commit 4de17ae

Please sign in to comment.