make some arrays const

this way they'll go into .rodata, decreasing memory pressure.
This commit is contained in:
rofl0r
2013-02-02 03:19:25 +01:00
parent facc6acbfd
commit c50925071c
7 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -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)
+1 -1
View File
@@ -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)
+1 -1
View File
@@ -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)