From 0c046a068022bbbfa6cc45c73bb11392616b7d19 Mon Sep 17 00:00:00 2001 From: vlendec Date: Fri, 7 Sep 2007 12:13:16 +0000 Subject: [PATCH] Apply some const git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_2@24993 0c0555d6-39d7-0310-84fc-f1cc0bd64818 --- source/lib/hmacmd5.c | 3 ++- source/rpc_parse/parse_prs.c | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/source/lib/hmacmd5.c b/source/lib/hmacmd5.c index 7f7115218..86db3aa23 100644 --- a/source/lib/hmacmd5.c +++ b/source/lib/hmacmd5.c @@ -121,7 +121,8 @@ void hmac_md5_final(unsigned char *digest, HMACMD5Context *ctx) use the microsoft hmacmd5 init method because the key is 16 bytes. ************************************************************/ -void hmac_md5( unsigned char key[16], unsigned char *data, int data_len, unsigned char *digest) +void hmac_md5( unsigned char key[16], const unsigned char *data, int data_len, + unsigned char *digest) { HMACMD5Context ctx; hmac_md5_init_limK_to_64(key, 16, &ctx); diff --git a/source/rpc_parse/parse_prs.c b/source/rpc_parse/parse_prs.c index 3c1b200eb..b92433f92 100644 --- a/source/rpc_parse/parse_prs.c +++ b/source/rpc_parse/parse_prs.c @@ -1551,7 +1551,7 @@ static void schannel_digest(struct schannel_auth_struct *a, uchar digest_final[16]) { uchar whole_packet_digest[16]; - static uchar zeros[4]; + static const uchar zeros[4] = { 0, }; struct MD5Context ctx3; /* verfiy the signature on the packet by MD5 over various bits */ @@ -1580,7 +1580,7 @@ static void schannel_get_sealing_key(struct schannel_auth_struct *a, RPC_AUTH_SCHANNEL_CHK *verf, uchar sealing_key[16]) { - static uchar zeros[4]; + static const uchar zeros[4] = { 0, }; uchar digest2[16]; uchar sess_kf0[16]; int i; @@ -1607,7 +1607,7 @@ static void schannel_get_sealing_key(struct schannel_auth_struct *a, static void schannel_deal_with_seq_num(struct schannel_auth_struct *a, RPC_AUTH_SCHANNEL_CHK *verf) { - static uchar zeros[4]; + static const uchar zeros[4] = { 0, }; uchar sequence_key[16]; uchar digest1[16]; -- 2.34.1