diff options
author | Lubomir Rintel <lkundrak@v3.sk> | 2018-04-24 13:14:07 +0200 |
---|---|---|
committer | Lubomir Rintel <lkundrak@v3.sk> | 2018-05-10 14:35:52 +0200 |
commit | f0c1efbf426260c6ed45f3ae83b9a4e2b5a347c4 (patch) | |
tree | dae666c4e38c2276b4819210ad9c2f4ca83799a4 /src | |
parent | 1829126f3abe8af591af2d0906f04b3dae01743e (diff) | |
download | NetworkManager-f0c1efbf426260c6ed45f3ae83b9a4e2b5a347c4.tar.gz |
all: add and utilize nm_utils_is_separator()
It is meant to be rather similar in nature to isblank() or
g_ascii_isspace().
Sadly, isblank() is locale dependent while g_ascii_isspace() also considers
vertical whitespace as a space. That's no good for configuration files that
are strucutured into lines, which happens to be a pretty common case.
Diffstat (limited to 'src')
-rw-r--r-- | src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c b/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c index 7fa473cb6e..11474c3da7 100644 --- a/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c +++ b/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c @@ -502,7 +502,7 @@ parse_route_line_is_comment (const char *line) * * initscripts compares: "$line" =~ '^[[:space:]]*(\#.*)?$' */ - while (NM_IN_SET (line[0], ' ', '\t')) + while (nm_utils_is_separator (line[0])) line++; if (NM_IN_SET (line[0], '\0', '#')) return TRUE; |