Re: [PATCH 06/10] conffile: fix striping of quotes from values.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxx>
> ---
>  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@xxxxxxxxxxxxxxx
> 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@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux