[sr-dev] git:master:ffc10c8a: core: fix related to e3ecad34bb1 in dst_blacklist.c, small whitespace change in ut.c

Henning Westerholt hw at kamailio.org
Mon Feb 11 21:18:15 CET 2019


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

Author: Henning Westerholt <hw at kamailio.org>
Committer: Henning Westerholt <hw at kamailio.org>
Date: 2019-02-11T21:15:57+01:00

core: fix related to e3ecad34bb1 in dst_blacklist.c, small whitespace change in ut.c

---

Modified: src/core/dst_blacklist.c
Modified: src/core/ut.c

---

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

---

diff --git a/src/core/dst_blacklist.c b/src/core/dst_blacklist.c
index 5259c34b04..da2718c709 100644
--- a/src/core/dst_blacklist.c
+++ b/src/core/dst_blacklist.c
@@ -164,13 +164,12 @@ static int init_blst_callback_lst(struct blst_callbacks_lst*  cb_lst, int max)
 	cb_lst->max_hooks=MAX_BLST_HOOKS;
 	cb_lst->last_idx=0;
 	cb_lst->hooks=pkg_malloc(cb_lst->max_hooks*sizeof(struct blacklist_hook));
-	if (cb_lst->hooks==0)
-	        PKG_MEM_ERROR;
-		goto error;
+	if (cb_lst->hooks==0) {
+		PKG_MEM_ERROR;
+		return -1;
+	}
 	memset(cb_lst->hooks, 0, cb_lst->max_hooks*sizeof(struct blacklist_hook));
 	return 0;
-error:
-	return -1;
 }
 
 
diff --git a/src/core/ut.c b/src/core/ut.c
index 77842c9cfd..5ee8f34db1 100644
--- a/src/core/ut.c
+++ b/src/core/ut.c
@@ -160,7 +160,7 @@ char* as_asciiz(str* s)
 
     r = (char*)pkg_malloc(s->len + 1);
     if (!r) {
-			PKG_MEM_ERROR;
+		PKG_MEM_ERROR;
 		return 0;
     }
     memcpy(r, s->s, s->len);




More information about the sr-dev mailing list