mirror of
https://github.com/znc/znc.git
synced 2026-05-18 07:15:54 +02:00
Mark some global vars as const and static and some static local vars as const
This way the compiler puts those vars in .rodata instead of .data and everyone happy. (Plus we have one symbol less exported) git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1241 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
@@ -61,7 +61,7 @@ void CMD5::md5_starts(md5_context *ctx) const {
|
||||
ctx->state[3] = 0x10325476;
|
||||
}
|
||||
|
||||
void CMD5::md5_process(md5_context *ctx, uint8 data[64]) const {
|
||||
void CMD5::md5_process(md5_context *ctx, const uint8 data[64]) const {
|
||||
uint32 X[16], A, B, C, D;
|
||||
|
||||
GET_UINT32(X[0], data, 0);
|
||||
@@ -180,7 +180,7 @@ void CMD5::md5_process(md5_context *ctx, uint8 data[64]) const {
|
||||
ctx->state[3] += D;
|
||||
}
|
||||
|
||||
void CMD5::md5_update(md5_context *ctx, uint8 *input, uint32 length) const {
|
||||
void CMD5::md5_update(md5_context *ctx, const uint8 *input, uint32 length) const {
|
||||
uint32 left, fill;
|
||||
|
||||
if (!length) return;
|
||||
@@ -215,7 +215,7 @@ void CMD5::md5_update(md5_context *ctx, uint8 *input, uint32 length) const {
|
||||
}
|
||||
}
|
||||
|
||||
static uint8 md5_padding[64] = {
|
||||
static const uint8 md5_padding[64] = {
|
||||
0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
|
||||
Reference in New Issue
Block a user