Fix the code assigning 0 to pointer instead of NULL.
Signed-off-by: Byongho Lee <bhlee.kernel@gmail.com>
Signed-off-by: David Sterba <dsterba@suse.com>
for (j = 0 ; j < num_stripes ; j++) {
int i;
- struct chunk_info *p = 0;
+ struct chunk_info *p = NULL;
struct btrfs_stripe *stripe;
u64 devid;
ret = add_info_to_list(info_ptr, info_count, item);
if (ret) {
- *info_ptr = 0;
+ *info_ptr = NULL;
return 1;
}
*/
static struct btrfs_ioctl_space_args *load_space_info(int fd, char *path)
{
- struct btrfs_ioctl_space_args *sargs = 0, *sargs_orig = 0;
+ struct btrfs_ioctl_space_args *sargs = NULL, *sargs_orig = NULL;
int e, ret, count;
sargs_orig = sargs = calloc(1, sizeof(struct btrfs_ioctl_space_args));
int chunkcount, struct device_info *devinfo, int devcount,
char *path, unsigned unit_mode)
{
- struct btrfs_ioctl_space_args *sargs = 0;
+ struct btrfs_ioctl_space_args *sargs = NULL;
int i;
int ret = 0;
int width = 10; /* default 10 for human units */
struct device_info *info;
*device_info_count = 0;
- *device_info_ptr = 0;
+ *device_info_ptr = NULL;
ret = ioctl(fd, BTRFS_IOC_FS_INFO, &fi_args);
if (ret < 0) {
{
int i;
u64 total_unused = 0;
- struct string_table *matrix = 0;
+ struct string_table *matrix = NULL;
int ncols, nrows;
int col;
int unallocated_col;
prop_object_dev | prop_object_root, prop_label},
{"compression", "Set/get compression for a file or directory", 0,
prop_object_inode, prop_compression},
- {0, 0, 0, 0, 0}
+ {NULL, NULL, 0, 0, NULL}
};
btrfs_stack_qgroup_info_exclusive_compressed
(info);
add_qgroup(qgroup_lookup, sh->offset, a1, a2,
- a3, a4, a5, 0, 0, 0, 0, 0, 0, 0);
+ a3, a4, a5, 0, 0, 0, 0, 0,
+ NULL, NULL);
} else if (sh->type == BTRFS_QGROUP_LIMIT_KEY) {
limit = (struct btrfs_qgroup_limit_item *)
(args.buf + off);
a5 = btrfs_stack_qgroup_limit_rsv_exclusive
(limit);
add_qgroup(qgroup_lookup, sh->offset, 0, 0,
- 0, 0, 0, a1, a2, a3, a4, a5, 0, 0);
+ 0, 0, 0, a1, a2, a3, a4, a5,
+ NULL, NULL);
} else if (sh->type == BTRFS_QGROUP_RELATION_KEY) {
if (sh->offset < sh->objectid)
goto skip;
blkid_dev dev = NULL;
blkid_cache cache = NULL;
- if (blkid_get_cache(&cache, 0) < 0) {
+ if (blkid_get_cache(&cache, NULL) < 0) {
printf("ERROR: lblkid cache get failed\n");
return 1;
}
if (btrfs_scan_done)
return 0;
- if (blkid_get_cache(&cache, 0) < 0) {
+ if (blkid_get_cache(&cache, NULL) < 0) {
printf("ERROR: lblkid cache get failed\n");
return 1;
}