From 2426130c90b216d131330e896daf7302cc198b4a Mon Sep 17 00:00:00 2001 From: Martin Schwenke Date: Wed, 24 Sep 2014 04:41:25 +1000 Subject: lib/util: Replace an SMB_ASSERT() Avoid a cyclic dependency. Signed-off-by: Martin Schwenke Reviewed-by: Jeremy Allison --- lib/util/substitute.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib/util/substitute.c') diff --git a/lib/util/substitute.c b/lib/util/substitute.c index 500d12777f9..30b4e00dc53 100644 --- a/lib/util/substitute.c +++ b/lib/util/substitute.c @@ -146,7 +146,11 @@ _PUBLIC_ char *string_sub_talloc(TALLOC_CTX *mem_ctx, const char *s, if (ret == NULL) return NULL; - SMB_ASSERT(ret[len] == '\0'); + if (ret[len] != '\0') { + DEBUG(0,("Internal error at %s(%d): string not terminated\n", + __FILE__, __LINE__)); + abort(); + } talloc_set_name_const(ret, ret); -- cgit v1.2.1