summaryrefslogtreecommitdiff
path: root/source3/libsmb/nmblib.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2001-10-29 08:12:44 +0000
committerAndrew Bartlett <abartlet@samba.org>2001-10-29 08:12:44 +0000
commitfab88997b021ad66dd7f03220d95d1f7ee315140 (patch)
tree4bd3e77ccb5fe5b330abec2840f993a42bc0fd2f /source3/libsmb/nmblib.c
parentd9d7f023d8d11943ca0375e1573e6ec9921889bc (diff)
downloadsamba-fab88997b021ad66dd7f03220d95d1f7ee315140.tar.gz
samba-fab88997b021ad66dd7f03220d95d1f7ee315140.tar.bz2
samba-fab88997b021ad66dd7f03220d95d1f7ee315140.zip
This patch applied, except without the structure changes to nmblib.c
Andrew Bartlett. From kai@cmail.ru Mon Oct 29 18:50:42 2001 Date: Fri, 19 Oct 2001 17:26:06 +0300 From: Andrew V. Samoilov <kai@cmail.ru> To: samba-technical@lists.samba.org Subject: [patch]: makes some arrays const to be shared between processes Hi! This patch makes some arrays const. So these arrays go to text/rodata segment and are shared between all of the processes which use shared library with these arrays. Regards, Andrew V. Samoilov. P.S. Please cc your answer to kai@cmail.ru, I don't subscribed to this list. ChangeLog: * cliconnect.c (prots): Make const. * clierror.c (rap_errmap): Likewise. * nmblib.c (nmb_header_opcode_names): Likewise. (lookup_opcode_name): Make opcode_namep const. Eliminate i. * nterr.c (nt_err_code_struct): Typedef const. * smberr.c (err_code_struct): Make const. (err_classes): Likewise. (This used to be commit cb84485a2b0e1fdcb6fa90e0bfb97e125ae1b3dd)
Diffstat (limited to 'source3/libsmb/nmblib.c')
-rw-r--r--source3/libsmb/nmblib.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source3/libsmb/nmblib.c b/source3/libsmb/nmblib.c
index d7bd7b49a0..dc39924818 100644
--- a/source3/libsmb/nmblib.c
+++ b/source3/libsmb/nmblib.c
@@ -25,7 +25,7 @@
int num_good_sends = 0;
int num_good_receives = 0;
-static struct opcode_names {
+static const struct opcode_names {
char *nmb_opcode_name;
int opcode;
} nmb_header_opcode_names[] = {
@@ -42,9 +42,9 @@ static struct opcode_names {
/****************************************************************************
* Lookup a nmb opcode name.
****************************************************************************/
-static char *lookup_opcode_name( int opcode )
+static const char *lookup_opcode_name( int opcode )
{
- struct opcode_names *op_namep;
+ const struct opcode_names *op_namep;
int i;
for(i = 0; nmb_header_opcode_names[i].nmb_opcode_name != 0; i++) {