[Asterisk-code-review] taskprocessor.c: Simplify ast taskprocessor get() return code. (asterisk[master])

Joshua Colp asteriskteam at digium.com
Sat Jan 16 08:28:17 CST 2016


Joshua Colp has submitted this change and it was merged.

Change subject: taskprocessor.c: Simplify ast_taskprocessor_get() return code.
......................................................................


taskprocessor.c: Simplify ast_taskprocessor_get() return code.

Change-Id: Id5bd18ef1f60ef8be453e677e98478298358a9d1
---
M main/taskprocessor.c
1 file changed, 0 insertions(+), 5 deletions(-)

Approvals:
  Mark Michelson: Looks good to me, but someone else must approve
  Anonymous Coward #1000019: Verified
  Joshua Colp: Looks good to me, approved



diff --git a/main/taskprocessor.c b/main/taskprocessor.c
index 9a4424e..5f2f8de 100644
--- a/main/taskprocessor.c
+++ b/main/taskprocessor.c
@@ -713,12 +713,7 @@
 	}
 
 	p = __allocate_taskprocessor(name, listener);
-	if (!p) {
-		ao2_ref(listener, -1);
-		return NULL;
-	}
 
-	/* Unref listener here since the taskprocessor has gained a reference to the listener */
 	ao2_ref(listener, -1);
 	return p;
 }

-- 
To view, visit https://gerrit.asterisk.org/2025
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Id5bd18ef1f60ef8be453e677e98478298358a9d1
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Richard Mudgett <rmudgett at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>



More information about the asterisk-code-review mailing list