summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2019-10-21 14:38:47 +0200
committerMartin Schwenke <martins@samba.org>2019-10-23 02:37:12 +0000
commitf37b913348e921afee3e578ff0f14b731157eb03 (patch)
tree5add2fa6aee594da5a9f5b68a2c614ded9b09aed /source3/smbd
parent0559701478d42e969c8c779d765163271ca9141e (diff)
downloadsamba-f37b913348e921afee3e578ff0f14b731157eb03.tar.gz
smbd: Save 520 bytes of writable memory from every smbd
Move what can be const from the "data" to the "text" segment Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net> Autobuild-User(master): Martin Schwenke <martins@samba.org> Autobuild-Date(master): Wed Oct 23 02:37:12 UTC 2019 on sn-devel-184
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/mangle_hash2.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source3/smbd/mangle_hash2.c b/source3/smbd/mangle_hash2.c
index 074794170b4..92319495f2a 100644
--- a/source3/smbd/mangle_hash2.c
+++ b/source3/smbd/mangle_hash2.c
@@ -195,7 +195,7 @@ static void init_tables(void)
* initializers, but I'll leave it in: less surprise.
*/
-static uint8_t char_flags[256] = {
+static const uint8_t char_flags[256] = {
0x80, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,
@@ -230,7 +230,7 @@ static uint8_t char_flags[256] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
-static uint8_t base_reverse[256] = {
+static const uint8_t base_reverse[256] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -433,7 +433,7 @@ static bool is_mangled(const char *name, const struct share_params *parm)
get larger when converted from UNIX to DOS formats)
*/
-static char force_shortname_chars[] = " +,[];=";
+static const char force_shortname_chars[] = " +,[];=";
static bool is_8_3(const char *name, bool check_case, bool allow_wildcards, const struct share_params *p)
{