Re: [PATCH 1/1] Remove unnecessary branching in free-space-tree.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, May 17, 2017 at 03:33:45AM -0700, Sahil Kang wrote:
> Both btrfs_create_free_space_tree and btrfs_clear_free_space_tree
> contain:
> 
>   if (ret)
>           return ret;
> 
>   return 0;
> 
> The if statement is only false when ret equals zero, and since we return
> zero in such cases, we can safely remove the branching.

Yeah the code looks better that way. Please don't forget to add the
'btrfs: ' prefix to the subject, I've fixed that now.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux