libnm: don't use local variable in _bond_get_option_or_default()

Brevity is the Soul of Wit.
This commit is contained in:
Thomas Haller 2020-04-10 08:43:30 +02:00
parent 2c2ed2374f
commit 1ef894f489

View file

@ -238,13 +238,8 @@ static const char*
_bond_get_option_or_default (NMSettingBond *self,
const char *option)
{
const char *value;
value = _bond_get_option (self, option);
if (!value) {
value = _bond_get_option_default (self, option);
}
return value;
return _bond_get_option (self, option)
?: _bond_get_option_default (self, option);
}
static const char*