summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormrb0nk500 <b0nk@b0nk.xyz>2022-08-04 12:00:18 -0300
committermrb0nk500 <b0nk@b0nk.xyz>2022-08-04 12:04:52 -0300
commit7d4f5aec3eca63ace47e01c8ef09b0dec95b876c (patch)
tree762552491c3f57562e1fde102051e9e03ac4298f
parent19b8aad81df46615c799d34245e704f1ca7a391a (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.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/keyword.c b/keyword.c
index 2afe455..16db0a2 100644
--- a/keyword.c
+++ b/keyword.c
@@ -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? */