summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2004-06-08 20:10:26 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:51:54 -0500
commit7e6734a0dd50c11601c60e86dee202004b2d6a90 (patch)
tree64b8969092693ec36c4d18fdf962428ffbdba6ac /source3
parent2fc57c9a2ce3a266534dd20e6fed4883e052c557 (diff)
downloadsamba-7e6734a0dd50c11601c60e86dee202004b2d6a90.tar.gz
samba-7e6734a0dd50c11601c60e86dee202004b2d6a90.tar.bz2
samba-7e6734a0dd50c11601c60e86dee202004b2d6a90.zip
r1087: BUG 1221: revert old change that used single and double quotes as delimters in next_token(), and change print_parameter() to print out parm values surrounded by double quotes (instead of single quotes)
(This used to be commit b0739b073a1db8b0b163726a1d181b2f05d71883)
Diffstat (limited to 'source3')
-rw-r--r--source3/lib/util_str.c2
-rw-r--r--source3/param/loadparm.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/source3/lib/util_str.c b/source3/lib/util_str.c
index 65ef306ed1..7c5fa11c92 100644
--- a/source3/lib/util_str.c
+++ b/source3/lib/util_str.c
@@ -62,7 +62,7 @@ BOOL next_token(const char **ptr,char *buff, const char *sep, size_t bufsize)
/* copy over the token */
pbuf = buff;
for (quoted = False; len < bufsize && *s && (quoted || !strchr_m(sep,*s)); s++) {
- if (*s == '\"' || *s == '\'') {
+ if ( *s == '\"' ) {
quoted = !quoted;
} else {
len++;
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 4ac2f8950f..2c65ac67d9 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -3273,9 +3273,9 @@ static void print_parameter(struct parm_struct *p, void *ptr, FILE * f)
char **list = *(char ***)ptr;
for (; *list; list++) {
- /* surround strings with whitespace in single quotes */
+ /* surround strings with whitespace in double quotes */
if ( strchr_m( *list, ' ' ) )
- fprintf(f, "\'%s\'%s", *list, ((*(list+1))?", ":""));
+ fprintf(f, "\"%s\"%s", *list, ((*(list+1))?", ":""));
else
fprintf(f, "%s%s", *list, ((*(list+1))?", ":""));
}