summaryrefslogtreecommitdiff
path: root/source3/rpc_parse
diff options
context:
space:
mode:
authorJames Peach <jpeach@samba.org>2007-06-15 21:58:49 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:23:23 -0500
commitb1ce226af8b61ad7e3c37860a59c6715012e738b (patch)
tree4067151ac0de549002434afb9f42e75f052c6754 /source3/rpc_parse
parentaa4110e6f2432d76926198ce7a2a4adea4e1860a (diff)
downloadsamba-b1ce226af8b61ad7e3c37860a59c6715012e738b.tar.gz
samba-b1ce226af8b61ad7e3c37860a59c6715012e738b.tar.bz2
samba-b1ce226af8b61ad7e3c37860a59c6715012e738b.zip
r23510: Tidy calls to smb_panic by removing trailing newlines. Print the
failed expression in SMB_ASSERT. (This used to be commit 171dc060e2a576d724eed1ca65636bdafffd7713)
Diffstat (limited to 'source3/rpc_parse')
-rw-r--r--source3/rpc_parse/parse_misc.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/source3/rpc_parse/parse_misc.c b/source3/rpc_parse/parse_misc.c
index 586598db89..848fdae5e0 100644
--- a/source3/rpc_parse/parse_misc.c
+++ b/source3/rpc_parse/parse_misc.c
@@ -66,7 +66,7 @@ TALLOC_CTX *main_loop_talloc_get(void)
if (!main_loop_talloc) {
main_loop_talloc = talloc_init("main loop talloc (mainly parse_misc)");
if (!main_loop_talloc)
- smb_panic("main_loop_talloc: malloc fail\n");
+ smb_panic("main_loop_talloc: malloc fail");
}
return main_loop_talloc;
@@ -452,7 +452,7 @@ void init_unistr(UNISTR *str, const char *buf)
if (len) {
str->buffer = TALLOC_ZERO_ARRAY(get_talloc_ctx(), uint16, len);
if (str->buffer == NULL)
- smb_panic("init_unistr: malloc fail\n");
+ smb_panic("init_unistr: malloc fail");
rpcstr_push(str->buffer, buf, len*sizeof(uint16), STR_TERMINATE);
} else {
@@ -488,7 +488,7 @@ static void create_rpc_blob(RPC_DATA_BLOB *str, size_t len)
if (len) {
str->buffer = (uint8 *)TALLOC_ZERO(get_talloc_ctx(), len);
if (str->buffer == NULL)
- smb_panic("create_rpc_blob: talloc fail\n");
+ smb_panic("create_rpc_blob: talloc fail");
str->buf_len = len;
} else {
str->buffer = NULL;
@@ -595,7 +595,7 @@ void init_regval_buffer(REGVAL_BUFFER *str, const uint8 *buf, size_t len)
str->buffer = (uint16 *)TALLOC_ZERO(get_talloc_ctx(),
str->buf_max_len);
if (str->buffer == NULL)
- smb_panic("init_regval_buffer: talloc fail\n");
+ smb_panic("init_regval_buffer: talloc fail");
memcpy(str->buffer, buf, str->buf_len);
}
}
@@ -671,7 +671,7 @@ void copy_unistr2(UNISTR2 *str, const UNISTR2 *from)
if (str->uni_max_len) {
str->buffer = (uint16 *)TALLOC_ZERO_ARRAY(get_talloc_ctx(), uint16, str->uni_max_len);
if ((str->buffer == NULL)) {
- smb_panic("copy_unistr2: talloc fail\n");
+ smb_panic("copy_unistr2: talloc fail");
return;
}
/* copy the string */
@@ -705,7 +705,7 @@ void init_string2(STRING2 *str, const char *buf, size_t max_len, size_t str_len)
str->buffer = (uint8 *)TALLOC_ZERO(get_talloc_ctx(),
str->str_max_len);
if (str->buffer == NULL)
- smb_panic("init_string2: malloc fail\n");
+ smb_panic("init_string2: malloc fail");
memcpy(str->buffer, buf, str_len);
}
}
@@ -781,7 +781,7 @@ void init_unistr2(UNISTR2 *str, const char *buf, enum unistr2_term_codes flags)
str->buffer = TALLOC_ZERO_ARRAY(get_talloc_ctx(), uint16, len);
if (str->buffer == NULL) {
- smb_panic("init_unistr2: malloc fail\n");
+ smb_panic("init_unistr2: malloc fail");
return;
}
@@ -817,7 +817,7 @@ void init_unistr4(UNISTR4 *uni4, const char *buf, enum unistr2_term_codes flags)
{
uni4->string = TALLOC_P( get_talloc_ctx(), UNISTR2 );
if (!uni4->string) {
- smb_panic("init_unistr4: talloc fail\n");
+ smb_panic("init_unistr4: talloc fail");
return;
}
init_unistr2( uni4->string, buf, flags );
@@ -830,7 +830,7 @@ void init_unistr4_w( TALLOC_CTX *ctx, UNISTR4 *uni4, const smb_ucs2_t *buf )
{
uni4->string = TALLOC_P( ctx, UNISTR2 );
if (!uni4->string) {
- smb_panic("init_unistr4_w: talloc fail\n");
+ smb_panic("init_unistr4_w: talloc fail");
return;
}
init_unistr2_w( ctx, uni4->string, buf );
@@ -860,7 +860,7 @@ void init_unistr2_w(TALLOC_CTX *ctx, UNISTR2 *str, const smb_ucs2_t *buf)
if (len + 1) {
str->buffer = TALLOC_ZERO_ARRAY(ctx, uint16, len + 1);
if (str->buffer == NULL) {
- smb_panic("init_unistr2_w: talloc fail\n");
+ smb_panic("init_unistr2_w: talloc fail");
return;
}
} else {
@@ -916,7 +916,7 @@ void init_unistr2_from_unistr(UNISTR2 *to, const UNISTR *from)
if (i) {
to->buffer = TALLOC_ZERO_ARRAY(get_talloc_ctx(), uint16, i);
if (to->buffer == NULL)
- smb_panic("init_unistr2_from_unistr: malloc fail\n");
+ smb_panic("init_unistr2_from_unistr: malloc fail");
memcpy(to->buffer, from->buffer, i*sizeof(uint16));
} else {
to->buffer = NULL;
@@ -945,7 +945,7 @@ void init_unistr2_from_datablob(UNISTR2 *str, DATA_BLOB *blob)
str->buffer = NULL;
}
if ((str->buffer == NULL) && (blob->length > 0)) {
- smb_panic("init_unistr2_from_datablob: malloc fail\n");
+ smb_panic("init_unistr2_from_datablob: malloc fail");
}
}
@@ -1710,7 +1710,7 @@ void init_unistr3(UNISTR3 *str, const char *buf)
if (str->uni_str_len) {
str->str.buffer = TALLOC_ZERO_ARRAY(get_talloc_ctx(), uint16, str->uni_str_len);
if (str->str.buffer == NULL)
- smb_panic("init_unistr3: malloc fail\n");
+ smb_panic("init_unistr3: malloc fail");
rpcstr_push((char *)str->str.buffer, buf, str->uni_str_len * sizeof(uint16), STR_TERMINATE);
} else {