lib/thread: Use PRIu64 for portability

POSIX defines PRId64/PRIu64/PRIx64 for printing 64-bit values in a
portable way. Replace a reference to %lu to remove the assumption
about the size of a long.

Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Change-Id: I622fd43e7acf2cb93d3ba4ba9e9367e6dd064a74
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9663
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
This commit is contained in:
Nick Connolly 2021-09-28 12:05:50 +01:00 committed by Tomasz Zawadzki
parent 7098e2ed31
commit 2a51824a54

View File

@ -1554,8 +1554,8 @@ static void
wrong_thread(const char *func, const char *name, struct spdk_thread *thread, wrong_thread(const char *func, const char *name, struct spdk_thread *thread,
struct spdk_thread *curthread) struct spdk_thread *curthread)
{ {
SPDK_ERRLOG("%s(%s) called from wrong thread %s:%lu (should be " SPDK_ERRLOG("%s(%s) called from wrong thread %s:%" PRIu64 " (should be "
"%s:%lu)\n", func, name, curthread->name, curthread->id, "%s:%" PRIu64 ")\n", func, name, curthread->name, curthread->id,
thread->name, thread->id); thread->name, thread->id);
assert(false); assert(false);
} }