[pve-devel] [PATCH] be sure to have the bridge up

Dietmar Maurer dietmar at proxmox.com
Fri Mar 23 11:36:53 CET 2012


> > +#be sure to have the bridge up
> > +system ("/sbin/ip link set $bridge up") == 0 ||
> > +    die "can't up bridge $bridge\n";
> 
> Don't use || here use or instead. Cause || also return the specific return value.
> And were not interested in the return value. It doesn't make a difference while
> executing the code but in theorie or is faster in such a case.
> 
> Always use "and" and "or" instead of && and || if you do not need the return
> value.

Hi Stefan,

we use '||' everywhere, so I do clearly prefer that.

- Dietmar



More information about the pve-devel mailing list