summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f331304)
raw | patch | inline | side by side (parent: f331304)
author | Florian Forster <octo@huhu.verplant.org> | |
Wed, 24 Mar 2010 16:44:41 +0000 (17:44 +0100) | ||
committer | Florian Forster <octo@huhu.verplant.org> | |
Wed, 24 Mar 2010 16:44:41 +0000 (17:44 +0100) |
While I hope that DS names can be trusted, I'm feeling more comfortable this
way nonetheless.
way nonetheless.
src/utils_format_json.c | patch | blob | history |
index 1ab03e1e26f4154aa35959153ffc224ed6fe0058..ac88c0fa27c4f7ae4b50cd734d78f886a79482b3 100644 (file)
--- a/src/utils_format_json.c
+++ b/src/utils_format_json.c
else if (((size_t) status) >= (buffer_size - offset)) \
return (-ENOMEM); \
else \
- offset += ((size_t) status); \
+ offset += ((size_t) status); \
} while (0)
BUFFER_ADD ("[");
if (i > 0)
BUFFER_ADD (",");
- BUFFER_ADD ("\"");
- BUFFER_ADD(DS_TYPE_TO_STRING(ds->ds[i].type));
- BUFFER_ADD ("\"");
+ BUFFER_ADD ("\"%s\"", DS_TYPE_TO_STRING (ds->ds[i].type));
} /* for ds->ds_num */
BUFFER_ADD ("]");
else if (((size_t) status) >= (buffer_size - offset)) \
return (-ENOMEM); \
else \
- offset += ((size_t) status); \
+ offset += ((size_t) status); \
} while (0)
BUFFER_ADD ("[");
if (i > 0)
BUFFER_ADD (",");
- BUFFER_ADD ("\"");
- BUFFER_ADD(ds->ds[i].name);
- BUFFER_ADD ("\"");
-
+ BUFFER_ADD ("\"%s\"", ds->ds[i].name);
} /* for ds->ds_num */
BUFFER_ADD ("]");