From 7d4f5aec3eca63ace47e01c8ef09b0dec95b876c Mon Sep 17 00:00:00 2001 From: mrb0nk500 Date: Thu, 4 Aug 2022 12:00:18 -0300 Subject: 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. --- keyword.c | 2 ++ 1 file changed, 2 insertions(+) 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? */ -- cgit v1.2.3-13-gbd6f