make some arrays const
this way they'll go into .rodata, decreasing memory pressure.
This commit is contained in:
@@ -182,7 +182,7 @@ static void md5_update(struct md5 *s, const void *m, unsigned long len)
|
||||
#define KEY_MAX 30000
|
||||
#define SALT_MAX 8
|
||||
|
||||
static unsigned char b64[] =
|
||||
static const unsigned char b64[] =
|
||||
"./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
|
||||
|
||||
static char *to64(char *s, unsigned int u, int n)
|
||||
|
||||
@@ -153,7 +153,7 @@ static void sha256_update(struct sha256 *s, const void *m, unsigned long len)
|
||||
memcpy(s->buf, p, len);
|
||||
}
|
||||
|
||||
static unsigned char b64[] =
|
||||
static const unsigned char b64[] =
|
||||
"./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
|
||||
|
||||
static char *to64(char *s, unsigned int u, int n)
|
||||
|
||||
@@ -174,7 +174,7 @@ static void sha512_update(struct sha512 *s, const void *m, unsigned long len)
|
||||
memcpy(s->buf, p, len);
|
||||
}
|
||||
|
||||
static unsigned char b64[] =
|
||||
static const unsigned char b64[] =
|
||||
"./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
|
||||
|
||||
static char *to64(char *s, unsigned int u, int n)
|
||||
|
||||
Reference in New Issue
Block a user