]> granicus.if.org Git - transmission/commitdiff
Don't print trailing space char on each line when saving JSON
authorMike Gelfand <mikedld@mikedld.com>
Mon, 1 Jun 2015 20:50:25 +0000 (20:50 +0000)
committerMike Gelfand <mikedld@mikedld.com>
Mon, 1 Jun 2015 20:50:25 +0000 (20:50 +0000)
libtransmission/variant-json.c

index 7c4e473c8f5d10cb1d877b62ef176fb7e6718768..bbac6a4f7e7bd1668a232b712e16fee572f2c70f 100644 (file)
@@ -428,7 +428,7 @@ jsonChildFunc (struct jsonWalk * data)
 
                   if (!isLast)
                     {
-                      evbuffer_add (data->out, ", ", data->doIndent ? 2 : 1);
+                      evbuffer_add (data->out, ",", 1);
                       jsonIndent (data);
                     }
                 }
@@ -440,7 +440,7 @@ jsonChildFunc (struct jsonWalk * data)
               const bool isLast = ++pstate->childIndex == pstate->childCount;
               if (!isLast)
                 {
-                  evbuffer_add (data->out, ", ", data->doIndent ? 2 : 1);
+                  evbuffer_add (data->out, ",", 1);
                   jsonIndent (data);
                 }
               break;