summaryrefslogtreecommitdiff
path: root/source3/libsmb/cliquota.c
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/libsmb/cliquota.c
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/libsmb/cliquota.c')
-rw-r--r--source3/libsmb/cliquota.c23
1 files changed, 15 insertions, 8 deletions
diff --git a/source3/libsmb/cliquota.c b/source3/libsmb/cliquota.c
index 2a47ae2463..8bba453d52 100644
--- a/source3/libsmb/cliquota.c
+++ b/source3/libsmb/cliquota.c
@@ -54,8 +54,9 @@ static BOOL parse_user_quota_record(const char *rdata, unsigned int rdata_count,
ZERO_STRUCT(qt);
- if (!rdata||!offset||!pqt)
- smb_panic("parse_quota_record: called with NULL POINTER!\n");
+ if (!rdata||!offset||!pqt) {
+ smb_panic("parse_quota_record: called with NULL POINTER!");
+ }
if (rdata_count < 40) {
return False;
@@ -138,8 +139,9 @@ BOOL cli_get_user_quota(struct cli_state *cli, int quota_fnum, SMB_NTQUOTA_STRUC
unsigned int sid_len;
unsigned int offset;
- if (!cli||!pqt)
+ if (!cli||!pqt) {
smb_panic("cli_get_user_quota() called with NULL Pointer!");
+ }
setup = NT_TRANSACT_GET_USER_QUOTA;
@@ -204,8 +206,9 @@ BOOL cli_set_user_quota(struct cli_state *cli, int quota_fnum, SMB_NTQUOTA_STRUC
unsigned int sid_len;
memset(data,'\0',112);
- if (!cli||!pqt)
+ if (!cli||!pqt) {
smb_panic("cli_set_user_quota() called with NULL Pointer!");
+ }
setup = NT_TRANSACT_SET_USER_QUOTA;
@@ -265,8 +268,9 @@ BOOL cli_list_user_quota(struct cli_state *cli, int quota_fnum, SMB_NTQUOTA_LIST
SMB_NTQUOTA_STRUCT qt;
SMB_NTQUOTA_LIST *tmp_list_ent;
- if (!cli||!pqt_list)
+ if (!cli||!pqt_list) {
smb_panic("cli_list_user_quota() called with NULL Pointer!");
+ }
setup = NT_TRANSACT_GET_USER_QUOTA;
@@ -419,8 +423,9 @@ BOOL cli_get_fs_quota_info(struct cli_state *cli, int quota_fnum, SMB_NTQUOTA_ST
SMB_NTQUOTA_STRUCT qt;
ZERO_STRUCT(qt);
- if (!cli||!pqt)
+ if (!cli||!pqt) {
smb_panic("cli_get_fs_quota_info() called with NULL Pointer!");
+ }
setup = TRANSACT2_QFSINFO;
@@ -507,8 +512,9 @@ BOOL cli_set_fs_quota_info(struct cli_state *cli, int quota_fnum, SMB_NTQUOTA_ST
ZERO_STRUCT(qt);
memset(data,'\0',48);
- if (!cli||!pqt)
+ if (!cli||!pqt) {
smb_panic("cli_set_fs_quota_info() called with NULL Pointer!");
+ }
setup = TRANSACT2_SETFSINFO;
@@ -577,8 +583,9 @@ static char *quota_str_static(SMB_BIG_UINT val, BOOL special, BOOL _numeric)
void dump_ntquota(SMB_NTQUOTA_STRUCT *qt, BOOL _verbose, BOOL _numeric, void (*_sidtostring)(fstring str, DOM_SID *sid, BOOL _numeric))
{
- if (!qt)
+ if (!qt) {
smb_panic("dump_ntquota() called with NULL pointer");
+ }
switch (qt->qtype) {
case SMB_USER_FS_QUOTA_TYPE: