ifcfg-rh: refactor code to avoid unnecessary copies

svGetValueStr() is preferred over svGetValueStr_cp() because it may safe
an additional string copy (if the value needs no unescaping/unquoting).

Also, use nm_utils_strsplit_set() because it saves to copy each word.

There are some changes here. For example, read_8021x_list_value()
previously would not strip empty words. When switching from
g_strsplit_set() to nm_utils_strsplit_set(), empty words are implicitly
skipped.
This commit is contained in:
Thomas Haller 2017-09-15 11:26:33 +02:00
parent b1029c6198
commit e54fad0886

File diff suppressed because it is too large Load diff