term: thrd_success isn't necessarily 0

This commit is contained in:
Daniel Eklöf 2020-05-03 14:17:54 +02:00
parent 729a57d3a8
commit 6bac1bd257
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -497,7 +497,7 @@ initialize_render_workers(struct terminal *term)
int ret = thrd_create(
&term->render.workers.threads[i], &render_worker_thread, ctx);
if (ret != 0) {
if (ret != thrd_success) {
LOG_ERR("failed to create render worker thread: %s (%d)",
thrd_err_as_string(ret), ret);
@ -664,7 +664,7 @@ load_fonts_from_conf(const struct terminal *term, const struct config *conf,
thrd_t tids[4] = {};
for (size_t i = 0; i < 4; i++) {
int ret = thrd_create(&tids[i], &font_loader_thread, &data[i]);
if (ret != 0) {
if (ret != thrd_success) {
LOG_ERR("failed to create font loader thread: %s (%d)",
thrd_err_as_string(ret), ret);
break;
@ -1365,7 +1365,7 @@ term_font_size_adjust(struct terminal *term, double amount)
thrd_t tids[4] = {};
for (size_t i = 0; i < 4; i++) {
int ret = thrd_create(&tids[i], &font_size_adjust_thread, &data[i]);
if (ret != 0) {
if (ret != thrd_success) {
LOG_ERR("failed to create font adjustmen thread: %s (%d)",
thrd_err_as_string(ret), ret);
break;