summaryrefslogtreecommitdiff
path: root/src/nm-test-utils-core.h
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2019-09-21 15:47:18 +0200
committerThomas Haller <thaller@redhat.com>2019-12-04 18:46:10 +0100
commit333e734ea4f0ef013c2bc6ae303b375cf0530edf (patch)
tree9b46c24a10980750d98614403c559039111c36f5 /src/nm-test-utils-core.h
parente27cadd9185caf2ecb4bf12cd7296b9ff569ed37 (diff)
downloadNetworkManager-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-test-utils-core.h')
0 files changed, 0 insertions, 0 deletions