summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2015-02-26 21:00:11 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2015-02-26 21:00:11 +0100
commite0372735e1496bd6c47a264ef925bd39f29ad3ed (patch)
tree17b9c3af2e2879eff329f03ead9b5f06467a6760
parent8d7cca39dd2c481e4c08d2dd2dc980fee22230ef (diff)
Use printf_once instead of recoding it
* i386/i386at/kd_event.c: Call printf_once instead of recoding it. * i386/i386at/kd_mouse.c: Likewise.
-rw-r--r--i386/i386at/kd_event.c9
-rw-r--r--i386/i386at/kd_mouse.c9
2 files changed, 2 insertions, 16 deletions
diff --git a/i386/i386at/kd_event.c b/i386/i386at/kd_event.c
index 53dade7..694c165 100644
--- a/i386/i386at/kd_event.c
+++ b/i386/i386at/kd_event.c
@@ -293,14 +293,7 @@ void
kbd_enqueue(kd_event *ev)
{
if (kdq_full(&kbd_queue))
- {
- static int warned;
- if (!warned)
- {
- printf("kbd: queue full\n");
- warned = 1;
- }
- }
+ printf_once("kbd: queue full\n");
else
kdq_put(&kbd_queue, ev);
diff --git a/i386/i386at/kd_mouse.c b/i386/i386at/kd_mouse.c
index 50a3683..0f1881f 100644
--- a/i386/i386at/kd_mouse.c
+++ b/i386/i386at/kd_mouse.c
@@ -789,14 +789,7 @@ void
mouse_enqueue(kd_event *ev)
{
if (kdq_full(&mouse_queue))
- {
- static int warned;
- if (!warned)
- {
- printf("mouse: queue full\n");
- warned = 1;
- }
- }
+ printf_once("mouse: queue full\n");
else
kdq_put(&mouse_queue, ev);