diff options
author | Thomas Haller <thaller@redhat.com> | 2019-09-21 15:47:18 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2019-12-04 18:46:10 +0100 |
commit | 333e734ea4f0ef013c2bc6ae303b375cf0530edf (patch) | |
tree | 9b46c24a10980750d98614403c559039111c36f5 /src/nm-auth-subject.c | |
parent | e27cadd9185caf2ecb4bf12cd7296b9ff569ed37 (diff) | |
download | NetworkManager-th/initrd-parse-cleanup.tar.gz |
initrd: use nm_utils_strsplit_set_with_empty() to split strings in nmi_dt_reader_parse()th/initrd-parse-cleanup
strsplit() can be done in O(n) runtime and one memory allocation.
g_strsplit() creates a deepcopied strv array, requiring allocate
memory for each token separately. Also, it's implemented by constructing
the list with a tempory GSList, so it actually needs two allocations
for each tokens.
I think we should not use such wasteful API, if we don't need a clone
of the tokens.
Diffstat (limited to 'src/nm-auth-subject.c')
0 files changed, 0 insertions, 0 deletions