From 3fb8070751ce689969e4fc17874a00a517e8b03f Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Sun, 20 Jun 2021 17:47:31 -0700 Subject: [PATCH] remove redundant error check in push_obj_state The zmalloc function calls exit() on failure, so there is not need to check its return value for out-of-memory. --- lib/common/emit.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/common/emit.c b/lib/common/emit.c index 0d799e449..a08b5c286 100644 --- a/lib/common/emit.c +++ b/lib/common/emit.c @@ -83,8 +83,7 @@ obj_state_t* push_obj_state(GVJ_t *job) { obj_state_t *obj, *parent; - if (! (obj = zmalloc(sizeof(obj_state_t)))) - agerr(AGERR, "no memory from zmalloc()\n"); + obj = zmalloc(sizeof(obj_state_t)); parent = obj->parent = job->obj; job->obj = obj; -- 2.40.0