Re: [PATCH] Drop some useless comparisons and checks

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

 



On Wed, Feb 27, 2019 at 03:39:01PM +0100, Michal Privoznik wrote:
> In these cases the check that is removed has been done a few
> lines above already (as can even be seen in the context). Drop
> them.
>
> Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>

...

>          } else {
>              /* assign default priority if none can be found via lookup */
> -            if (!name_prefix ||
> -                 intMapGetByString(chain_priorities, name_prefix, 0,
> -                                   &ret->chainPriority) < 0) {
> +            if (intMapGetByString(chain_priorities, name_prefix, 0, &ret->chainPriority) < 0) {

You forgot to wrap the long line ;)

>                  /* assign default chain priority */

Also ^this commentary is essentially the same as the one right before the 'if'
block, so it should be dropped, no need for a separate patch ;).
Moreover, once we drop it we can also get rid of the curly braces in this 'if'
block and still comply with our guidelines, but this is optional.

Reviewed-by: Erik Skultety <eskultet@xxxxxxxxxx>

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux