From 77f8e6fa28386a35a7a231dfcf4f51df5c77e2c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Wed, 16 Jan 2019 16:27:25 +0100 Subject: [PATCH] xcb: xcb_error() no longer prefixes error message with "XCB: " --- bar.c | 2 +- modules/xwindow.c | 2 +- xcb.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bar.c b/bar.c index 334763c..9f4cceb 100644 --- a/bar.c +++ b/bar.c @@ -579,7 +579,7 @@ run(struct bar_run_context *run_ctx) { switch (XCB_EVENT_RESPONSE_TYPE(e)) { case 0: - LOG_ERR("%s", xcb_error((const xcb_generic_error_t *)e)); + LOG_ERR("XCB: %s", xcb_error((const xcb_generic_error_t *)e)); break; case XCB_EXPOSE: diff --git a/modules/xwindow.c b/modules/xwindow.c index 08ab552..6fb709a 100644 --- a/modules/xwindow.c +++ b/modules/xwindow.c @@ -244,7 +244,7 @@ run(struct module *mod) { switch (XCB_EVENT_RESPONSE_TYPE(_e)) { case 0: - LOG_ERR("%s", xcb_error((const xcb_generic_error_t *)_e)); + LOG_ERR("XCB: %s", xcb_error((const xcb_generic_error_t *)_e)); case XCB_PROPERTY_NOTIFY: { xcb_property_notify_event_t *e = (xcb_property_notify_event_t *)_e; diff --git a/xcb.c b/xcb.c index 17435e5..74d5adc 100644 --- a/xcb.c +++ b/xcb.c @@ -218,12 +218,12 @@ xcb_error(const xcb_generic_error_t *error) err_context, error->error_code, &extension); snprintf(msg, sizeof(msg), - "XCB: %s (%s), code %s (%s), sequence %u", + "%s (%s), code %s (%s), sequence %u", major, minor != NULL ? minor : "no minor", name, extension != NULL ? extension : "no extension", error->sequence); #else - snprintf(msg, sizeof(msg), "XCB: op %hhu:%hu, code %hhu, sequence %hu", + snprintf(msg, sizeof(msg), "op %hhu:%hu, code %hhu, sequence %hu", error->major_code, error->minor_code, error->error_code, error->sequence); #endif