X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Futils%2Fovs%2Fovs.c;h=52a590b164e579d88228e0b5b8ecd646541bf21a;hb=904a45ef1b06bf7b14238af6d2aeb9bce176daf7;hp=46c2c2696d19cb62b95f76c770cdbac5fc1c0a74;hpb=ff8b75e1820552a8bbd1832544451723cbde768b;p=collectd.git diff --git a/src/utils/ovs/ovs.c b/src/utils/ovs/ovs.c index 46c2c269..52a590b1 100644 --- a/src/utils/ovs/ovs.c +++ b/src/utils/ovs/ovs.c @@ -785,7 +785,9 @@ static void *ovs_poll_worker(void *arg) { ovs_db_t *pdb = (ovs_db_t *)arg; /* pointer to OVS DB */ ovs_json_reader_t *jreader = NULL; struct pollfd poll_fd = { - .fd = pdb->sock, .events = POLLIN | POLLPRI, .revents = 0, + .fd = pdb->sock, + .events = POLLIN | POLLPRI, + .revents = 0, }; /* create JSON reader instance */ @@ -1117,7 +1119,7 @@ int ovs_db_send_request(ovs_db_t *pdb, const char *method, const char *params, /* generate id field */ OVS_YAJL_CALL(ovs_yajl_gen_tstring, jgen, "id"); uid = ovs_uid_generate(); - snprintf(uid_buff, sizeof(uid_buff), "%" PRIX64, uid); + ssnprintf(uid_buff, sizeof(uid_buff), "%" PRIX64, uid); OVS_YAJL_CALL(ovs_yajl_gen_tstring, jgen, uid_buff); OVS_YAJL_CALL(yajl_gen_map_close, jgen); @@ -1203,7 +1205,7 @@ int ovs_db_table_cb_register(ovs_db_t *pdb, const char *tb_name, OVS_YAJL_CALL(ovs_yajl_gen_tstring, jgen, OVS_DB_DEFAULT_DB_NAME); /* uid string */ - snprintf(uid_str, sizeof(uid_str), "%" PRIX64, new_cb->uid); + ssnprintf(uid_str, sizeof(uid_str), "%" PRIX64, new_cb->uid); OVS_YAJL_CALL(ovs_yajl_gen_tstring, jgen, uid_str); /* */