mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-07 17:10:21 +01:00
l3cfg: accept %NULL argument to nm_l3_config_data_seal()
There is always a question between convenience of allowing %NULL (and do nothing) and strictly require the user to check the argument to not be %NULL. In this case, it's more convenient to accept NULL, than require the callers to check for it.
This commit is contained in:
parent
6f2c69f484
commit
882168c728
1 changed files with 4 additions and 2 deletions
|
|
@ -700,8 +700,10 @@ nm_l3_config_data_ref_and_seal(const NML3ConfigData *self)
|
|||
const NML3ConfigData *
|
||||
nm_l3_config_data_seal(const NML3ConfigData *self)
|
||||
{
|
||||
nm_assert(_NM_IS_L3_CONFIG_DATA(self, TRUE));
|
||||
((NML3ConfigData *) self)->is_sealed = TRUE;
|
||||
if (self) {
|
||||
nm_assert(_NM_IS_L3_CONFIG_DATA(self, TRUE));
|
||||
((NML3ConfigData *) self)->is_sealed = TRUE;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue