Skip to content

Commit

Permalink
Abolish uses of %+d
Browse files Browse the repository at this point in the history
(EE) BUG: triggered 'if (f[f_idx])'
(EE) BUG: ../../os/log.c:565 in vpnprintf()
(EE) Unsupported printf directive '+'
  • Loading branch information
ijackson committed Apr 23, 2016
1 parent c1301b0 commit 5962b0f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/mtstate.c
Original file line number Diff line number Diff line change
Expand Up @@ -286,23 +286,23 @@ static void mtstate_output(const struct MTState* ms,
foreach_bit(i, ms->touch_used) {
if (GETBIT(ms->touch[i].state, MT_RELEASED)) {
timersub(&hs->evtime, &ms->touch[i].down, &tv);
xf86Msg(X_INFO, " released p(%d, %d) d(%+d, %+d) dir(%f) down(%llu) time(%lld)\n",
xf86Msg(X_INFO, " released p(%d, %d) d(%d, %d) dir(%f) down(%llu) time(%lld)\n",
ms->touch[i].x, ms->touch[i].y, ms->touch[i].dx, ms->touch[i].dy,
ms->touch[i].direction, timertoms(&ms->touch[i].down), timertoms(&tv));
}
else if (GETBIT(ms->touch[i].state, MT_NEW)) {
xf86Msg(X_INFO, " new p(%d, %d) d(%+d, %+d) dir(%f) down(%llu)\n",
xf86Msg(X_INFO, " new p(%d, %d) d(%d, %d) dir(%f) down(%llu)\n",
ms->touch[i].x, ms->touch[i].y, ms->touch[i].dx, ms->touch[i].dy,
ms->touch[i].direction, timertoms(&ms->touch[i].down));
}
else if (GETBIT(ms->touch[i].state, MT_INVALID)) {
timersub(&hs->evtime, &ms->touch[i].down, &tv);
xf86Msg(X_INFO, " invalid p(%d, %d) d(%+d, %+d) dir(%f) down(%llu) time(%lld)\n",
xf86Msg(X_INFO, " invalid p(%d, %d) d(%d, %d) dir(%f) down(%llu) time(%lld)\n",
ms->touch[i].x, ms->touch[i].y, ms->touch[i].dx, ms->touch[i].dy,
ms->touch[i].direction, timertoms(&ms->touch[i].down), timertoms(&tv));
}
else {
xf86Msg(X_INFO, " touching p(%d, %d) d(%+d, %+d) dir(%f) down(%llu)\n",
xf86Msg(X_INFO, " touching p(%d, %d) d(%d, %d) dir(%f) down(%llu)\n",
ms->touch[i].x, ms->touch[i].y, ms->touch[i].dx, ms->touch[i].dy,
ms->touch[i].direction, timertoms(&ms->touch[i].down));
}
Expand Down

2 comments on commit 5962b0f

@rynbrd
Copy link
Owner

@rynbrd rynbrd commented on 5962b0f Apr 23, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why remove the signage?

@ijackson
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As i say in the commit message: says, otherwise I get a Bug message from the xf86 core. It seems xf86Msg has its own printf implementation, which doesn't support %+d.

Please sign in to comment.