Re: [PATCH 1/9] util: new functions for setting bridge and bridge port attributes

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

 



On 11/24/2014 01:36 PM, John Ferlan wrote:
> 
> 
> On 11/24/2014 12:48 PM, Laine Stump wrote:
>> These functions all set/get items in the sysfs for a bridge device.
> 
> Probably could have split up the "virNetDevBridgePort*" from the
> virNetDevBridgeSetVlanFiltering - if only to make it a bit clearer in
> the commit message that you're adding functions to manage? the
> BridgePort settings.
> 

>> +
>> +    *enable = !!value;
> 
> Every time I see one of these "!!"...
> 
> I see virNetDevBridgeGetSTP() uses *enabled = val ? true : false; -
> that's at least easier to read for me. Your call on which way to go though.

I'm the opposite color of bikeshed - 'val ? true : false' feels
over-verbose, compared to the shorter '!!val'; and we already use the
short form elsewhere in the code base so it is somewhat idiomatic.  But
like John, I don't care about the paint color enough to dictate which
way you go.


>> +++ b/src/util/virnetdevbridge.h
>> @@ -1,5 +1,5 @@
>>  /*
>> - * Copyright (C) 2007-2011 Red Hat, Inc.
>> + * Copyright (C) 2007-2012, 2014 Red Hat, Inc.
> 
> I forget if we're just allowed to say 2007-2014...

Generally, for Red Hat copyright lines, I only use a range if there is
at least one @redhat.com authorship during each year of the range; alas,
for this file, it was created during a split in 2011 (so earlier years
come from its earlier history in other files) and 2 commits in 2012, but
nothing in 2013.  I don't think we are in any legal trouble by including
2013, but I wouldn't add it in my own workflow.

Other contributors may have different rules for when they add copyright
years; I treat those as something I will not modify, whether they are
right or wrong (although I do try to point out suspicious use in reviews
if I notice it).

I'm also starting to be of the opinion that if anyone ever takes this to
court, the git log will be of much more use than actual years listed in
any given file :)

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
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]