Skip to content

Commit

Permalink
linux-gen: queue: fix error print format
Browse files Browse the repository at this point in the history
Add missing '%' from printf formats. Also use hex instead of int
format as queue handles are pointers.

Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org>
Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
  • Loading branch information
Petri Savolainen authored and muvarov committed Sep 28, 2018
1 parent f8e019e commit 50f15e4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions platform/linux-generic/odp_queue_basic.c
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ static int error_enqueue(odp_queue_t handle, odp_buffer_hdr_t *buf_hdr)
{
(void)buf_hdr;

ODP_ERR("Enqueue not supported (" PRIu64 ")\n",
ODP_ERR("Enqueue not supported (0x%" PRIx64 ")\n",
odp_queue_to_u64(handle));

return -1;
Expand All @@ -571,15 +571,15 @@ static int error_enqueue_multi(odp_queue_t handle,
(void)buf_hdr;
(void)num;

ODP_ERR("Enqueue multi not supported (" PRIu64 ")\n",
ODP_ERR("Enqueue multi not supported (0x%" PRIx64 ")\n",
odp_queue_to_u64(handle));

return -1;
}

static odp_buffer_hdr_t *error_dequeue(odp_queue_t handle)
{
ODP_ERR("Dequeue not supported (" PRIu64 ")\n",
ODP_ERR("Dequeue not supported (0x%" PRIx64 ")\n",
odp_queue_to_u64(handle));

return NULL;
Expand All @@ -591,7 +591,7 @@ static int error_dequeue_multi(odp_queue_t handle,
(void)buf_hdr;
(void)num;

ODP_ERR("Dequeue multi not supported (" PRIu64 ")\n",
ODP_ERR("Dequeue multi not supported (0x%" PRIx64 ")\n",
odp_queue_to_u64(handle));

return -1;
Expand Down Expand Up @@ -623,7 +623,7 @@ static int queue_info(odp_queue_t handle, odp_queue_info_t *info)
queue_id = queue_to_index(handle);

if (odp_unlikely(queue_id >= ODP_CONFIG_QUEUES)) {
ODP_ERR("Invalid queue handle:%" PRIu64 "\n",
ODP_ERR("Invalid queue handle: 0x%" PRIx64 "\n",
odp_queue_to_u64(handle));
return -1;
}
Expand Down

0 comments on commit 50f15e4

Please sign in to comment.