From e131c94ac1b06cc49b1c25717d3496dba8b0b3df Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 5 May 2011 13:42:05 -0700 Subject: More const fixes for compiler warnings from the waf build. --- source3/libsmb/cliquota.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source3/libsmb/cliquota.c') diff --git a/source3/libsmb/cliquota.c b/source3/libsmb/cliquota.c index e5c8c831b73..94694e4530e 100644 --- a/source3/libsmb/cliquota.c +++ b/source3/libsmb/cliquota.c @@ -88,7 +88,7 @@ static bool parse_user_quota_record(const uint8_t *rdata, /* the hard quotas 8 bytes (uint64_t)*/ qt.hardlim = BVAL(rdata,32); - if (!sid_parse((char *)rdata+40,sid_len,&qt.sid)) { + if (!sid_parse((const char *)rdata+40,sid_len,&qt.sid)) { return false; } @@ -262,7 +262,7 @@ NTSTATUS cli_list_user_quota(struct cli_state *cli, int quota_fnum, ((curdata)&&(curdata_count>=8)&&(offset>0)); curdata +=offset,curdata_count -= offset) { ZERO_STRUCT(qt); - if (!parse_user_quota_record((uint8_t *)curdata, curdata_count, + if (!parse_user_quota_record((const uint8_t *)curdata, curdata_count, &offset, &qt)) { DEBUG(1,("Failed to parse the quota record\n")); goto cleanup; @@ -318,7 +318,7 @@ NTSTATUS cli_list_user_quota(struct cli_state *cli, int quota_fnum, ((curdata)&&(curdata_count>=8)&&(offset>0)); curdata +=offset,curdata_count -= offset) { ZERO_STRUCT(qt); - if (!parse_user_quota_record((uint8_t *)curdata, + if (!parse_user_quota_record((const uint8_t *)curdata, curdata_count, &offset, &qt)) { DEBUG(1,("Failed to parse the quota record\n")); -- cgit From 27022587e31769718ab53f4d114e03ac2f205f27 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Fri, 6 May 2011 11:47:43 +0200 Subject: s3-libsmb: move protos to libsmb/proto.h Guenther --- source3/libsmb/cliquota.c | 1 + 1 file changed, 1 insertion(+) (limited to 'source3/libsmb/cliquota.c') diff --git a/source3/libsmb/cliquota.c b/source3/libsmb/cliquota.c index 94694e4530e..74430fe0ca0 100644 --- a/source3/libsmb/cliquota.c +++ b/source3/libsmb/cliquota.c @@ -18,6 +18,7 @@ */ #include "includes.h" +#include "libsmb/libsmb.h" #include "../librpc/gen_ndr/ndr_security.h" #include "fake_file.h" #include "../libcli/security/security.h" -- cgit From ad0a07c531fadd1639c5298951cfaf5cfe0cb10e Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Tue, 7 Jun 2011 11:44:43 +1000 Subject: s3-talloc Change TALLOC_ZERO_P() to talloc_zero() Using the standard macro makes it easier to move code into common, as TALLOC_ZERO_P isn't standard talloc. --- source3/libsmb/cliquota.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source3/libsmb/cliquota.c') diff --git a/source3/libsmb/cliquota.c b/source3/libsmb/cliquota.c index 74430fe0ca0..9136506e48c 100644 --- a/source3/libsmb/cliquota.c +++ b/source3/libsmb/cliquota.c @@ -269,13 +269,13 @@ NTSTATUS cli_list_user_quota(struct cli_state *cli, int quota_fnum, goto cleanup; } - if ((tmp_list_ent=TALLOC_ZERO_P(mem_ctx,SMB_NTQUOTA_LIST))==NULL) { + if ((tmp_list_ent=talloc_zero(mem_ctx,SMB_NTQUOTA_LIST))==NULL) { DEBUG(0,("TALLOC_ZERO() failed\n")); talloc_destroy(mem_ctx); return NT_STATUS_NO_MEMORY; } - if ((tmp_list_ent->quotas=TALLOC_ZERO_P(mem_ctx,SMB_NTQUOTA_STRUCT))==NULL) { + if ((tmp_list_ent->quotas=talloc_zero(mem_ctx,SMB_NTQUOTA_STRUCT))==NULL) { DEBUG(0,("TALLOC_ZERO() failed\n")); talloc_destroy(mem_ctx); return NT_STATUS_NO_MEMORY; @@ -326,13 +326,13 @@ NTSTATUS cli_list_user_quota(struct cli_state *cli, int quota_fnum, goto cleanup; } - if ((tmp_list_ent=TALLOC_ZERO_P(mem_ctx,SMB_NTQUOTA_LIST))==NULL) { + if ((tmp_list_ent=talloc_zero(mem_ctx,SMB_NTQUOTA_LIST))==NULL) { DEBUG(0,("TALLOC_ZERO() failed\n")); talloc_destroy(mem_ctx); goto cleanup; } - if ((tmp_list_ent->quotas=TALLOC_ZERO_P(mem_ctx,SMB_NTQUOTA_STRUCT))==NULL) { + if ((tmp_list_ent->quotas=talloc_zero(mem_ctx,SMB_NTQUOTA_STRUCT))==NULL) { DEBUG(0,("TALLOC_ZERO() failed\n")); talloc_destroy(mem_ctx); goto cleanup; -- cgit