diff options
author | Jim McDonough <jmcd@samba.org> | 2003-10-18 01:07:37 +0000 |
---|---|---|
committer | Jim McDonough <jmcd@samba.org> | 2003-10-18 01:07:37 +0000 |
commit | ba0c899510e81eddfc76eeb1b3d875d5a8c6d0d0 (patch) | |
tree | eb16c66a020a289dfde5a349abcce9d34d8355da /source3/rpc_parse | |
parent | b227a561f7bae32353dc22aa78acf622f5c7fbe7 (diff) | |
download | samba-ba0c899510e81eddfc76eeb1b3d875d5a8c6d0d0.tar.gz samba-ba0c899510e81eddfc76eeb1b3d875d5a8c6d0d0.tar.bz2 samba-ba0c899510e81eddfc76eeb1b3d875d5a8c6d0d0.zip |
Fix tower length calculations and add some const
(This used to be commit 2f84c6c9a1c292535e73721a8bcdb27aaa2b2b46)
Diffstat (limited to 'source3/rpc_parse')
-rw-r--r-- | source3/rpc_parse/parse_epmapper.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/source3/rpc_parse/parse_epmapper.c b/source3/rpc_parse/parse_epmapper.c index 9e21da04dd..368ea319bd 100644 --- a/source3/rpc_parse/parse_epmapper.c +++ b/source3/rpc_parse/parse_epmapper.c @@ -175,12 +175,12 @@ NTSTATUS init_epm_tower(TALLOC_CTX *ctx, EPM_TOWER *tower, DEBUG(5, ("init_epm_tower\n")); + size += sizeof(uint16); /* number of floors is in tower length */ for (i = 0; i < num_floors; i++) { - size += (sizeof(uint32) * 2); + size += (sizeof(uint16) * 2); size += floors[i].lhs.length; size += floors[i].rhs.length; } - size += sizeof(uint8); /* this could be aligning... */ tower->referent_id = ++internal_referent_id; tower->max_length = tower->length = size; @@ -345,7 +345,8 @@ NTSTATUS init_epm_q_map(TALLOC_CTX *ctx, EPM_Q_MAP *q_map, /***************************************************************** epm_io_q_map - read or write EPM_Q_MAP structure ******************************************************************/ -BOOL epm_io_q_map(char *desc, EPM_Q_MAP *io_map, prs_struct *ps, int depth) +BOOL epm_io_q_map(const char *desc, EPM_Q_MAP *io_map, prs_struct *ps, + int depth) { prs_debug(ps, depth, desc, "epm_io_q_map"); depth++; @@ -373,7 +374,7 @@ BOOL epm_io_q_map(char *desc, EPM_Q_MAP *io_map, prs_struct *ps, int depth) /******************************************************************* epm_io_r_map - Read/Write EPM_R_MAP structure ******************************************************************/ -BOOL epm_io_r_map(char *desc, EPM_R_MAP *io_map, +BOOL epm_io_r_map(const char *desc, EPM_R_MAP *io_map, prs_struct *ps, int depth) { int i; |