diff options
author | mrb0nk500 <b0nk@b0nk.xyz> | 2022-08-04 12:00:18 -0300 |
---|---|---|
committer | mrb0nk500 <b0nk@b0nk.xyz> | 2022-08-04 12:04:52 -0300 |
commit | 7d4f5aec3eca63ace47e01c8ef09b0dec95b876c (patch) | |
tree | 762552491c3f57562e1fde102051e9e03ac4298f | |
parent | 19b8aad81df46615c799d34245e704f1ca7a391a (diff) |
git: Make use of `remove_trailing_whitespace()` in
`parse_key_value_file()`
This is a much better way of doing it than what was done previously.
-rw-r--r-- | keyword.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -115,6 +115,8 @@ int parse_key_value_file(void *ret, void *ctx, const keyword **keywords, char *b } else { /* Get the rest of the line. */ rhs = strtok_r(tmp, "\n", &buf); + /* Remove any whitespace ahead of us. */ + rhs = remove_trailing_whitespace(rhs); } /* Did we fail to parse the keyword? */ |