Skip to content

Commit

Permalink
cleanup fmt warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
ekoby committed Mar 5, 2024
1 parent 0d70815 commit 8219092
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
7 changes: 5 additions & 2 deletions library/bind.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@


#include <assert.h>
#include <inttypes.h>

#include "ziti/ziti.h"
#include "endian_internal.h"
#include "win32_compat.h"
Expand Down Expand Up @@ -162,11 +164,12 @@ static void schedule_rebind(struct ziti_conn *conn, bool now) {
uv_random(conn->ziti_ctx->loop, NULL, &random, sizeof(random), 0, NULL);
delay = (uint64_t) (random % (backoff * REBIND_DELAY));
conn->server.attempt++;
CONN_LOG(DEBUG, "scheduling re-bind(attempt=%d) in %ld.%lds", conn->server.attempt, delay / 1000, delay % 1000);
CONN_LOG(DEBUG, "scheduling re-bind(attempt=%d) in %" PRIu64 ".%" PRIu64 "s",
conn->server.attempt, delay / 1000, delay % 1000);

} else {
conn->server.attempt = 0;
CONN_LOG(DEBUG, "scheduling re-bind in %ld.%lds", delay / 1000, delay % 1000);
CONN_LOG(DEBUG, "scheduling re-bind in %" PRIu64 ".%" PRIu64 "s", delay / 1000, delay % 1000);
}

uv_timer_start(conn->server.timer, rebind_delay_cb, delay, 0);
Expand Down
8 changes: 6 additions & 2 deletions library/ziti_ctrl.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include <inttypes.h>
#include <stdlib.h>

#include "utils.h"
#include "zt_internal.h"
#include <ziti_ctrl.h>
Expand Down Expand Up @@ -325,7 +327,8 @@ static void ctrl_body_cb(tlsuv_http_req_t *req, char *b, ssize_t len) {
uv_timeval64_t now;
uv_gettimeofday(&now);
uint64_t elapsed = (now.tv_sec * 1000000 + now.tv_usec) - (resp->start.tv_sec * 1000000 + resp->start.tv_usec);
CTRL_LOG(DEBUG, "completed %s[%s] in %ld.%03ld s", req->method, req->path, elapsed / 1000000, (elapsed / 1000) % 1000);
CTRL_LOG(DEBUG, "completed %s[%s] in %" PRIu64 ".%03" PRIu64 " s",
req->method, req->path, elapsed / 1000000, (elapsed / 1000) % 1000);
if (resp->paging) {
bool last_page = cr.meta.pagination.total <= cr.meta.pagination.offset + cr.meta.pagination.limit;
if (cr.meta.pagination.total > resp->total) {
Expand Down Expand Up @@ -353,7 +356,8 @@ static void ctrl_body_cb(tlsuv_http_req_t *req, char *b, ssize_t len) {
return;
}
elapsed = (now.tv_sec * 1000000 + now.tv_usec) - (resp->all_start.tv_sec * 1000000 + resp->all_start.tv_usec);
CTRL_LOG(DEBUG, "completed paging request GET[%s] in %ld.%03ld s", resp->base_path, elapsed / 1000000, (elapsed / 1000) % 1000);
CTRL_LOG(DEBUG, "completed paging request GET[%s] in %" PRIu64 ".%03" PRIu64 " s",
resp->base_path, elapsed / 1000000, (elapsed / 1000) % 1000);
resp_obj = resp->resp_array;
}
}
Expand Down

0 comments on commit 8219092

Please sign in to comment.