summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2006-09-04 09:51:47 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:43:23 -0500
commit6655e1e997fa96408ce257f1c96773db4551f69f (patch)
tree485a5b6dd5aa1696d74d84c9250573b80da5d6d5
parentf5906de76db2ba8c95af3da34a283de3da21ec0f (diff)
downloadsamba-6655e1e997fa96408ce257f1c96773db4551f69f.tar.gz
samba-6655e1e997fa96408ce257f1c96773db4551f69f.tar.bz2
samba-6655e1e997fa96408ce257f1c96773db4551f69f.zip
r18029: More C++ stuff
(This used to be commit 089b51e28cc5e3674e4edf5464c7a15673c5ec0f)
-rw-r--r--source3/auth/auth_util.c4
-rw-r--r--source3/lib/snprintf.c2
-rw-r--r--source3/libsmb/ntlm_check.c2
-rw-r--r--source3/libsmb/ntlmssp.c2
-rw-r--r--source3/rpc_parse/parse_prs.c2
-rw-r--r--source3/utils/ntlm_auth.c2
-rw-r--r--source3/utils/ntlm_auth_diagnostics.c2
7 files changed, 8 insertions, 8 deletions
diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c
index c2f32f4f95..1ab9d2a49e 100644
--- a/source3/auth/auth_util.c
+++ b/source3/auth/auth_util.c
@@ -1374,7 +1374,7 @@ static NTSTATUS make_new_server_info_guest(auth_serversupplied_info **server_inf
struct samu *sampass = NULL;
DOM_SID guest_sid;
BOOL ret;
- static const char zeros[16];
+ static const char zeros[16] = { 0, };
if ( !(sampass = samu_new( NULL )) ) {
return NT_STATUS_NO_MEMORY;
@@ -1691,7 +1691,7 @@ NTSTATUS make_server_info_info3(TALLOC_CTX *mem_ctx,
auth_serversupplied_info **server_info,
NET_USER_INFO_3 *info3)
{
- static const char zeros[16];
+ static const char zeros[16] = { 0, };
NTSTATUS nt_status = NT_STATUS_OK;
char *found_username;
diff --git a/source3/lib/snprintf.c b/source3/lib/snprintf.c
index 8ff76ab116..1cede3b27c 100644
--- a/source3/lib/snprintf.c
+++ b/source3/lib/snprintf.c
@@ -629,7 +629,7 @@ static size_t dopr(char *buffer, size_t maxlen, const char *format, va_list args
break;
case CNK_PTR:
- cnk->strvalue = va_arg (args, void *);
+ cnk->strvalue = (char *)va_arg (args, void *);
for (i = 1; i < clist[pnum].num; i++) {
clist[pnum].chunks[i]->strvalue = cnk->strvalue;
}
diff --git a/source3/libsmb/ntlm_check.c b/source3/libsmb/ntlm_check.c
index 212bc19767..e1fc92e344 100644
--- a/source3/libsmb/ntlm_check.c
+++ b/source3/libsmb/ntlm_check.c
@@ -183,7 +183,7 @@ NTSTATUS ntlm_password_check(TALLOC_CTX *mem_ctx,
DATA_BLOB *user_sess_key,
DATA_BLOB *lm_sess_key)
{
- static const unsigned char zeros[8];
+ static const unsigned char zeros[8] = { 0, };
if (nt_pw == NULL) {
DEBUG(3,("ntlm_password_check: NO NT password stored for user %s.\n",
username));
diff --git a/source3/libsmb/ntlmssp.c b/source3/libsmb/ntlmssp.c
index d017bdb76c..c1852a1187 100644
--- a/source3/libsmb/ntlmssp.c
+++ b/source3/libsmb/ntlmssp.c
@@ -1062,7 +1062,7 @@ static NTSTATUS ntlmssp_client_challenge(struct ntlmssp_state *ntlmssp_state,
}
if (!ntlmssp_state->nt_hash || !ntlmssp_state->lm_hash) {
- static const uchar zeros[16];
+ static const uchar zeros[16] = { 0, };
/* do nothing - blobs are zero length */
/* session key is all zeros */
diff --git a/source3/rpc_parse/parse_prs.c b/source3/rpc_parse/parse_prs.c
index 820565f09f..e348ef460d 100644
--- a/source3/rpc_parse/parse_prs.c
+++ b/source3/rpc_parse/parse_prs.c
@@ -1626,7 +1626,7 @@ void schannel_encode(struct schannel_auth_struct *a, enum pipe_auth_level auth_l
uchar digest_final[16];
uchar confounder[8];
uchar seq_num[8];
- static const uchar nullbytes[8];
+ static const uchar nullbytes[8] = { 0, };
static const uchar schannel_seal_sig[8] = SCHANNEL_SEAL_SIGNATURE;
static const uchar schannel_sign_sig[8] = SCHANNEL_SIGN_SIGNATURE;
diff --git a/source3/utils/ntlm_auth.c b/source3/utils/ntlm_auth.c
index 39b511ca4e..0774866e56 100644
--- a/source3/utils/ntlm_auth.c
+++ b/source3/utils/ntlm_auth.c
@@ -479,7 +479,7 @@ static NTSTATUS contact_winbind_change_pswd_auth_crap(const char *username,
static NTSTATUS winbind_pw_check(struct ntlmssp_state *ntlmssp_state, DATA_BLOB *user_session_key, DATA_BLOB *lm_session_key)
{
- static const char zeros[16];
+ static const char zeros[16] = { 0, };
NTSTATUS nt_status;
char *error_string;
uint8 lm_key[8];
diff --git a/source3/utils/ntlm_auth_diagnostics.c b/source3/utils/ntlm_auth_diagnostics.c
index e69715affd..f7997de711 100644
--- a/source3/utils/ntlm_auth_diagnostics.c
+++ b/source3/utils/ntlm_auth_diagnostics.c
@@ -449,7 +449,7 @@ static BOOL test_plaintext(enum ntlm_break break_which)
uchar user_session_key[16];
uchar lm_key[16];
- static const uchar zeros[8];
+ static const uchar zeros[8] = { 0, };
DATA_BLOB chall = data_blob(zeros, sizeof(zeros));
char *error_string;