Message ID | 148117124536.31271.10187990246409032535.stgit@noble (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Thu, Dec 08, 2016 at 03:27:25PM +1100, NeilBrown wrote: > There were being stripes from the name instead! s/stripes/stripped/. > > Signed-off-by: NeilBrown <neilb@suse.com> > --- > support/nfs/conffile.c | 16 ++++++++-------- > 1 file changed, 8 insertions(+), 8 deletions(-) > > diff --git a/support/nfs/conffile.c b/support/nfs/conffile.c > index 57f58a2bcdc7..e717c1e39bab 100644 > --- a/support/nfs/conffile.c > +++ b/support/nfs/conffile.c > @@ -300,14 +300,14 @@ conf_parse_line(int trans, char *line, size_t sz) > line[strcspn (line, " \t=")] = '\0'; > val = line + i + 1 + strspn (line + i + 1, " \t"); > > - if (line[0] == '"') { > - line ++; > - j = strcspn(line, "\""); > - line[j] = 0; > - } else if (line[0] == '\'') { > - line ++; > - j = strcspn(line, "'"); > - line[j] = 0; > + if (val[0] == '"') { > + val ++; > + j = strcspn(val, "\""); > + val[j] = 0; > + } else if (val[0] == '\'') { > + val ++; > + j = strcspn(val, "'"); > + val[j] = 0; > } else { > /* Skip trailing spaces and comments */ > for (j = 0; val[j]; j++) { > > > -- > To unsubscribe from this list: send the line "unsubscribe linux-nfs" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/support/nfs/conffile.c b/support/nfs/conffile.c index 57f58a2bcdc7..e717c1e39bab 100644 --- a/support/nfs/conffile.c +++ b/support/nfs/conffile.c @@ -300,14 +300,14 @@ conf_parse_line(int trans, char *line, size_t sz) line[strcspn (line, " \t=")] = '\0'; val = line + i + 1 + strspn (line + i + 1, " \t"); - if (line[0] == '"') { - line ++; - j = strcspn(line, "\""); - line[j] = 0; - } else if (line[0] == '\'') { - line ++; - j = strcspn(line, "'"); - line[j] = 0; + if (val[0] == '"') { + val ++; + j = strcspn(val, "\""); + val[j] = 0; + } else if (val[0] == '\'') { + val ++; + j = strcspn(val, "'"); + val[j] = 0; } else { /* Skip trailing spaces and comments */ for (j = 0; val[j]; j++) {
There were being stripes from the name instead! Signed-off-by: NeilBrown <neilb@suse.com> --- support/nfs/conffile.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html