diff options
| author | Baptiste Daroussin <bapt@FreeBSD.org> | 2015-10-07 08:56:01 +0000 |
|---|---|---|
| committer | Baptiste Daroussin <bapt@FreeBSD.org> | 2015-10-07 08:56:01 +0000 |
| commit | ca587fdaacefd37fa5c2efd4766931897b8a831a (patch) | |
| tree | 82d21966105ec00808cc7a5b2e2c8853d8142600 /sbin | |
| parent | 023d10cbc7bffdf97c8e62260b467e34502eacc8 (diff) | |
Notes
Diffstat (limited to 'sbin')
| -rw-r--r-- | sbin/sysctl/sysctl.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sbin/sysctl/sysctl.c b/sbin/sysctl/sysctl.c index d740778cf0c8..8d67644a65ee 100644 --- a/sbin/sysctl/sysctl.c +++ b/sbin/sysctl/sysctl.c @@ -262,6 +262,12 @@ parse(const char *string, int lineno) newvalstr = cp; newsize = strlen(cp); } + /* Trim spaces */ + cp = bufp + strlen(bufp) - 1; + while (cp >= bufp && isspace((int)*cp)) { + *cp = '\0'; + cp--; + } len = name2oid(bufp, mib); if (len < 0) { |
