[sr-dev] git:master:c061d668: erlang: fix unreachable code

Seudin Kasumovic seudin.kasumovic at gmail.com
Wed Jan 3 23:25:28 CET 2018


Module: kamailio
Branch: master
Commit: c061d6688c505544aecfc39a43e8c60d48875790
URL: https://github.com/kamailio/kamailio/commit/c061d6688c505544aecfc39a43e8c60d48875790

Author: Seudin Kasumovic <seudin.kasumovic at gmail.com>
Committer: Seudin Kasumovic <seudin.kasumovic at gmail.com>
Date: 2018-01-03T23:21:41+01:00

erlang: fix unreachable code

---

Modified: src/modules/erlang/handle_rpc.c

---

Diff:  https://github.com/kamailio/kamailio/commit/c061d6688c505544aecfc39a43e8c60d48875790.diff
Patch: https://github.com/kamailio/kamailio/commit/c061d6688c505544aecfc39a43e8c60d48875790.patch

---

diff --git a/src/modules/erlang/handle_rpc.c b/src/modules/erlang/handle_rpc.c
index fccec06680..5fe3c1f978 100644
--- a/src/modules/erlang/handle_rpc.c
+++ b/src/modules/erlang/handle_rpc.c
@@ -1418,15 +1418,13 @@ static int find_member(erl_rpc_ctx_t *ctx, int arity, const char* member_name)
 				erl_rpc_fault(ctx,400,"Unexpected end of struct tuple");
 				goto error;
 			}
-			continue;
+			i++;
 		}
 		else
 		{
 			/* return at current position */
 			return 0;
 		}
-
-		i++;
 	}
 
 	erl_rpc_fault(ctx,400, "Member %s not found",member_name);




More information about the sr-dev mailing list