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 <fziglio@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
This commit is contained in:
Frediano Ziglio 2016-06-08 16:11:25 +01:00
parent a931713902
commit e211f5dbe1

View File

@ -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, &timestamp);
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;