Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-15-SP2:GA
nfsidmap
0004-onf_parse_line-Ignore-whitespace-at-the-be...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0004-onf_parse_line-Ignore-whitespace-at-the-beginning-of.patch of Package nfsidmap
From c0a29a62c942a853a7b31b352f6f6783dcee6dca Mon Sep 17 00:00:00 2001 From: Malahal Naineni <malahal@us.ibm.com> Date: Tue, 9 Feb 2016 10:56:49 -0500 Subject: [PATCH] onf_parse_line: Ignore whitespace at the beginning of option tags The following should work now: [General] Domain = local.domain.edu Signed-off-by: Malahal Naineni <malahal@us.ibm.com> Signed-off-by: Steve Dickson <steved@redhat.com> --- cfg.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) --- a/cfg.c +++ b/cfg.c @@ -210,6 +210,7 @@ static void conf_parse_line (int trans, char *line, size_t sz) { char *val; + char *tag; size_t i; int j; static char *section = 0; @@ -262,8 +263,14 @@ conf_parse_line (int trans, char *line, /* Skip trailing whitespace, if any */ for (j = sz - (val - line) - 1; j > 0 && isspace (val[j]); j--) val[j] = '\0'; + + /* Skip beginning white space */ + tag = line; + while (isspace(*tag)) + tag++; + /* XXX Perhaps should we not ignore errors? */ - conf_set (trans, section, line, val, 0, 0); + conf_set (trans, section, tag, val, 0, 0); return; }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor