Skip to content

Commit 7fdaa72

Browse files
committed
ocp: replace to use json_object_* macros to obj_* macros
Since currently mixed to use them in ocp-print-json.c then unify. Signed-off-by: Tokunori Ikegami <[email protected]>
1 parent e21db3e commit 7fdaa72

File tree

3 files changed

+353
-415
lines changed

3 files changed

+353
-415
lines changed

nvme-print-json.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,6 @@
2222
#define array_add_obj json_array_add_value_object
2323
#define array_add_str json_array_add_value_string
2424

25-
#define obj_add_array json_object_add_value_array
26-
#define obj_add_int json_object_add_value_int
27-
#define obj_add_obj json_object_add_value_object
28-
#define obj_add_uint json_object_add_value_uint
29-
#define obj_add_uint128 json_object_add_value_uint128
30-
#define obj_add_uint64 json_object_add_value_uint64
31-
3225
static const uint8_t zero_uuid[16] = { 0 };
3326
static struct print_ops json_print_ops;
3427
static struct json_object *json_r;

nvme-print.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,13 @@ typedef struct nvme_effects_log_node {
2121
#define STR_LEN 100
2222

2323
#define obj_add_str json_object_add_value_string
24+
#define obj_add_int json_object_add_value_int
25+
#define obj_add_uint json_object_add_value_uint
26+
#define obj_add_uint64 json_object_add_value_uint64
27+
#define obj_add_uint128 json_object_add_value_uint128
28+
#define obj_add_obj json_object_add_value_object
29+
#define obj_add_array json_object_add_value_array
30+
#define obj_new_str_len json_object_new_string_len
2431

2532
void d(unsigned char *buf, int len, int width, int group);
2633
void d_raw(unsigned char *buf, unsigned len);

0 commit comments

Comments
 (0)