From e211f5dbe1b2cb53988424ffbf02d5dd3776d7f5 Mon Sep 17 00:00:00 2001 From: Frediano Ziglio Date: Wed, 8 Jun 2016 16:11:25 +0100 Subject: [PATCH] replay: Use proper formatting for scanf family Currently on Linux PRIu64 and SCNu64 are the same but just to make sure in the future use the correct macros. Signed-off-by: Frediano Ziglio Acked-by: Jonathon Jongsma --- server/red-replay-qxl.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/server/red-replay-qxl.c b/server/red-replay-qxl.c index 0cf442b5..59da5dda 100644 --- a/server/red-replay-qxl.c +++ b/server/red-replay-qxl.c @@ -424,7 +424,7 @@ static QXLImage *red_replay_image(SpiceReplay *replay, uint32_t flags) } qxl = (QXLImage*)replay_malloc0(replay, sizeof(QXLImage)); - replay_fscanf(replay, "descriptor.id %"PRIu64"\n", &qxl->descriptor.id); + replay_fscanf(replay, "descriptor.id %"SCNu64"\n", &qxl->descriptor.id); replay_fscanf(replay, "descriptor.type %d\n", &temp); qxl->descriptor.type = temp; replay_fscanf(replay, "descriptor.flags %d\n", &temp); qxl->descriptor.flags = temp; replay_fscanf(replay, "descriptor.width %d\n", &qxl->descriptor.width); @@ -453,7 +453,7 @@ static QXLImage *red_replay_image(SpiceReplay *replay, uint32_t flags) qp = replay_malloc(replay, sizeof(QXLPalette) + num_ents * sizeof(qp->ents[0])); qp->num_ents = num_ents; qxl->bitmap.palette = QXLPHYSICAL_FROM_PTR(qp); - replay_fscanf(replay, "unique %"PRIu64"\n", &qp->unique); + replay_fscanf(replay, "unique %"SCNu64"\n", &qp->unique); for (i = 0; i < num_ents; i++) { replay_fscanf(replay, "ents %d\n", &qp->ents[i]); } @@ -1296,7 +1296,7 @@ SPICE_GNUC_VISIBLE QXLCommandExt* spice_replay_next_cmd(SpiceReplay *replay, int counter; while (what != 0) { - replay_fscanf(replay, "event %d %d %d %"PRIu64"\n", &counter, + replay_fscanf(replay, "event %d %d %d %"SCNu64"\n", &counter, &what, &type, ×tamp); if (replay->error) { goto error; @@ -1308,7 +1308,7 @@ SPICE_GNUC_VISIBLE QXLCommandExt* spice_replay_next_cmd(SpiceReplay *replay, cmd = replay_malloc0(replay, sizeof(QXLCommandExt)); cmd->cmd.type = type; cmd->group_id = 0; - spice_debug("command %"PRIu64", %d\r", timestamp, cmd->cmd.type); + spice_debug("command %"SCNu64", %d\r", timestamp, cmd->cmd.type); switch (cmd->cmd.type) { case QXL_CMD_DRAW: cmd->flags = 0;