diff --git a/src/c2.c b/src/c2.c index dd3a1d83..2da02463 100644 --- a/src/c2.c +++ b/src/c2.c @@ -384,9 +384,6 @@ c2_parse(session_t *ps, c2_lptr_t **pcondlst, const char *pattern, { static const c2_lptr_t lptr_def = C2_LPTR_INIT; auto plptr = cmalloc(c2_lptr_t); - if (!plptr) - printf_errfq(1, "(): Failed to allocate memory for new condition linked" - " list element."); memcpy(plptr, &lptr_def, sizeof(c2_lptr_t)); plptr->ptr = result; plptr->data = data; @@ -611,8 +608,6 @@ c2_parse_target(session_t *ps, const char *pattern, int offset, c2_ptr_t *presul // Initialize leaf presult->isbranch = false; presult->l = cmalloc(c2_l_t); - if (!presult->l) - c2_error("Failed to allocate memory for new leaf."); c2_l_t * const pleaf = presult->l; memcpy(pleaf, &leaf_def, sizeof(c2_l_t)); @@ -1008,8 +1003,6 @@ c2_parse_legacy(session_t *ps, const char *pattern, int offset, c2_ptr_t *presul // Allocate memory for new leaf auto pleaf = cmalloc(c2_l_t); - if (!pleaf) - printf_errfq(1, "(): Failed to allocate memory for new leaf."); presult->isbranch = false; presult->l = pleaf; memcpy(pleaf, &leaf_def, sizeof(c2_l_t)); @@ -1098,8 +1091,6 @@ c2_l_postprocess(session_t *ps, c2_l_t *pleaf) { } if (!found) { auto pnew = cmalloc(latom_t); - if (!pnew) - printf_errfq(1, "(): Failed to allocate memory for new track atom."); pnew->next = ps->track_atom_lst; pnew->atom = pleaf->tgtatom; ps->track_atom_lst = pnew; diff --git a/src/config.c b/src/config.c index 99583885..681c63da 100644 --- a/src/config.c +++ b/src/config.c @@ -91,10 +91,6 @@ parse_matrix(session_t *ps, const char *src, const char **endptr) { // Allocate memory auto matrix = ccalloc(wid * hei + 2, xcb_render_fixed_t); - if (!matrix) { - printf_errf("(): Failed to allocate memory for matrix."); - goto err1; - } // Read elements { diff --git a/src/opengl.c b/src/opengl.c index c7a56375..585df3b8 100644 --- a/src/opengl.c +++ b/src/opengl.c @@ -572,10 +572,6 @@ glx_init_blur(session_t *ps) { strlen(FRAG_SHADER_BLUR_SUFFIX) + strlen(texture_func) + 12 + 1; char *shader_str = ccalloc(len, char); - if (!shader_str) { - printf_errf("(): Failed to allocate %d bytes for shader string.", len); - return false; - } { char *pc = shader_str; sprintf(pc, FRAG_SHADER_BLUR_PREFIX, extension, sampler_type); @@ -596,7 +592,6 @@ glx_init_blur(session_t *ps) { assert(strlen(shader_str) < len); } } - sprintf(pc, FRAG_SHADER_BLUR_SUFFIX, texture_func, sum); assert(strlen(shader_str) < len); } diff --git a/src/render.c b/src/render.c index 53b9e307..ff67bcad 100644 --- a/src/render.c +++ b/src/render.c @@ -768,11 +768,6 @@ win_blur_background(session_t *ps, win *w, xcb_render_picture_t tgt_buffer, // Allocate cache space if needed if (!kern_dst) { kern_dst = ccalloc(kwid * khei + 2, xcb_render_fixed_t); - if (!kern_dst) { - printf_errf("(): Failed to allocate memory " - "for blur kernel."); - return; - } ps->blur_kerns_cache[i] = kern_dst; }