Re: [PATCH] Auto-quote config values in config.c:store_write_pair()

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

 



Hi,

On Tue, 9 Jan 2007, Brian Gernhardt wrote:

> +	if (quote)
> +		write(fd, "\"", 1);
>  	for (i = 0; value[i]; i++)
>  		switch (value[i]) {
>  		case '\n': write(fd, "\\n", 2); break;
> @@ -508,6 +520,8 @@ static void store_write_pair(int fd, const char* key, const char* value)
>  		case '"': case '\\': write(fd, "\\", 1);
>  		default: write(fd, value+i, 1);
>  	}
> +	if (quote)
> +		write(fd, "\"", 1);

AFAICS this misses the case where you have to quote a single '"'.

Ciao,
Dscho

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]