mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-30 03:50:10 +01:00
core: optimize nm_match_spec_s390_subchannels() to return early
No need to parse the subchannels if the spec list is empty. This isn't actually an issue, because nm_match_spec_s390_subchannels() was never called with empty spec list.
This commit is contained in:
parent
6b0f84bdda
commit
de9848aa66
1 changed files with 3 additions and 0 deletions
|
|
@ -1108,6 +1108,9 @@ nm_match_spec_s390_subchannels (const GSList *specs, const char *subchannels)
|
|||
|
||||
g_return_val_if_fail (subchannels != NULL, NM_MATCH_SPEC_NO_MATCH);
|
||||
|
||||
if (!specs)
|
||||
return NM_MATCH_SPEC_NO_MATCH;
|
||||
|
||||
if (!parse_subchannels (subchannels, &a, &b, &c))
|
||||
return NM_MATCH_SPEC_NO_MATCH;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue