Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4b3b07f

Browse files
committed
Resolve one unconstify use
A small API change makes it unnecessary.Reported-by: Mark Dilger <hornschnorter@gmail.com>Discussion:https://www.postgresql.org/message-id/flat/53a28052-f9f3-1808-fed9-460fd43035ab%402ndquadrant.com
1 parent49fa99e commit4b3b07f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

‎contrib/pgcrypto/md5.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ static const uint8 md5_paddat[MD5_BUFLEN] = {
132132
0,0,0,0,0,0,0,0,
133133
};
134134

135-
staticvoidmd5_calc(uint8*,md5_ctxt*);
135+
staticvoidmd5_calc(constuint8*,md5_ctxt*);
136136

137137
void
138138
md5_init(md5_ctxt*ctxt)
@@ -161,7 +161,7 @@ md5_loop(md5_ctxt *ctxt, const uint8 *input, unsigned len)
161161
md5_calc(ctxt->md5_buf,ctxt);
162162

163163
for (i=gap;i+MD5_BUFLEN <=len;i+=MD5_BUFLEN)
164-
md5_calc(unconstify(uint8*, (input+i)),ctxt);
164+
md5_calc(input+i,ctxt);
165165

166166
ctxt->md5_i=len-i;
167167
memmove(ctxt->md5_buf,input+i,ctxt->md5_i);
@@ -242,15 +242,15 @@ static uint32 X[16];
242242
#endif
243243

244244
staticvoid
245-
md5_calc(uint8*b64,md5_ctxt*ctxt)
245+
md5_calc(constuint8*b64,md5_ctxt*ctxt)
246246
{
247247
uint32A=ctxt->md5_sta;
248248
uint32B=ctxt->md5_stb;
249249
uint32C=ctxt->md5_stc;
250250
uint32D=ctxt->md5_std;
251251

252252
#ifndefWORDS_BIGENDIAN
253-
uint32*X= (uint32*)b64;
253+
constuint32*X= (constuint32*)b64;
254254
#else
255255
/* 4 byte words */
256256
/* what a brute force but fast! */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp