Skip to content

Instantly share code, notes, and snippets.

@wwaites
Created April 16, 2011 09:26
Show Gist options
  • Save wwaites/923012 to your computer and use it in GitHub Desktop.
Save wwaites/923012 to your computer and use it in GitHub Desktop.
index fa7a319..d215d3e 100644
--- a/src/frontend/results.c
+++ b/src/frontend/results.c
@@ -1898,8 +1898,8 @@ static void output_json(fs_query *q, int flags, FILE *out)
GSList *it;
int count = 0;
for (it = q->warnings; it; it = it->next) {
- if (count++) {
- printf(", ");
+ if (it->next) {
+ fprintf(out, ", ");
}
char *text = it->data;
char *escd = NULL;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment