summaryrefslogtreecommitdiff
path: root/src/signature.c
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@dwim.me>2013-06-11 10:48:00 +0200
committerCarlos Martín Nieto <cmn@dwim.me>2013-06-11 11:01:45 +0200
commit24ec69998db55478af24b471b9000bd56113abd6 (patch)
tree87e2d460bbd239b5861a1c4762301b15c960c719 /src/signature.c
parent3de768ca2f148777f099c67114d0419a90b6eea1 (diff)
downloadlibgit2-24ec69998db55478af24b471b9000bd56113abd6.tar.gz
signature: extend trimming to more whitespace
There are all sorts of misconfiguration in the wild. We already rely on the signature constructor to trim SP. Extend the logic to use `isspace` to decide whether a character should be trimmed.
Diffstat (limited to 'src/signature.c')
-rw-r--r--src/signature.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/signature.c b/src/signature.c
index cd6167fb4..e338f0802 100644
--- a/src/signature.c
+++ b/src/signature.c
@@ -35,11 +35,11 @@ static bool contains_angle_brackets(const char *input)
static char *extract_trimmed(const char *ptr, size_t len)
{
- while (len && ptr[0] == ' ') {
+ while (len && git__isspace(ptr[0])) {
ptr++; len--;
}
- while (len && ptr[len - 1] == ' ') {
+ while (len && git__isspace(ptr[len - 1])) {
len--;
}