Skip to content

Commit 5b9a429

Browse files
committed
util: add json_object_add_format() function
This is to add a format string into the json object. Signed-off-by: Tokunori Ikegami <[email protected]>
1 parent b93853a commit 5b9a429

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

util/json.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ void json_object_add_0nprix64(struct json_object *o, const char *k, uint64_t v,
137137
json_object_add_value_string(o, k, str);
138138
}
139139

140-
void json_object_add_format(struct json_object *o, const char *k, const char *format, ...)
140+
void json_object_add_string(struct json_object *o, const char *k, const char *format, ...)
141141
{
142142
_cleanup_free_ char *value = NULL;
143143
va_list ap;

util/json.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,6 @@ void json_object_add_byte_array(struct json_object *o, const char *k, unsigned c
7878
void json_object_add_nprix64(struct json_object *o, const char *k, uint64_t v);
7979
void json_object_add_uint_0nx(struct json_object *o, const char *k, __u32 v, int width);
8080
void json_object_add_0nprix64(struct json_object *o, const char *k, uint64_t v, int width);
81-
void json_object_add_format(struct json_object *o, const char *k, const char *format, ...);
81+
void json_object_add_string(struct json_object *o, const char *k, const char *format, ...);
8282

8383
#endif /* __JSON__H */

0 commit comments

Comments
 (0)