Convert printf_errf/dbgf in several files

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui
2018-12-20 16:54:51 +00:00
parent 3966491846
commit b5b0f4af7f
4 changed files with 15 additions and 14 deletions

10
src/x.c
View File

@ -112,7 +112,7 @@ static inline void x_get_server_pictfmts(session_t *ps) {
xcb_render_query_pict_formats_reply(ps->c,
xcb_render_query_pict_formats(ps->c), &e);
if (e || !ps->pictfmts) {
printf_errf("(): failed to get pict formats\n");
log_fatal("failed to get pict formats\n");
abort();
}
}
@ -142,8 +142,8 @@ x_create_picture_with_pictfmt_and_pixmap(
if (attr) {
xcb_render_create_picture_value_list_serialize(&buf, valuemask, attr);
if (!buf) {
printf_errf("(): failed to serialize picture attributes");
return None;
log_error("failed to serialize picture attributes");
return XCB_NONE;
}
}
@ -153,8 +153,8 @@ x_create_picture_with_pictfmt_and_pixmap(
pixmap, pictfmt->id, valuemask, buf));
free(buf);
if (e) {
printf_errf("(): failed to create picture");
return None;
log_error("failed to create picture");
return XCB_NONE;
}
return tmp_picture;
}