[PATCH] decouple RPC modules from get_pipe_fns()

Volker Lendecke Volker.Lendecke at SerNet.DE
Fri Jan 26 09:47:16 GMT 2007


On Thu, Jan 25, 2007 at 11:32:33PM -0800, James Peach wrote:
> -        rpc_entry->cmds = SMB_REALLOC_ARRAY(rpc_entry->cmds, struct api_struct, rpc_entry->n_cmds + size);
> +        rpc_entry->cmds = SMB_REALLOC_ARRAY(rpc_entry->cmds,
> +			    struct api_struct, rpc_entry->n_cmds + ncmds);
>  	if (!rpc_entry->cmds) {
>  		return NT_STATUS_NO_MEMORY;
>  	}
> -        memcpy(rpc_entry->cmds + rpc_entry->n_cmds, cmds, size * sizeof(struct api_struct));
> -        rpc_entry->n_cmds += size;
> +        memcpy(rpc_entry->cmds + rpc_entry->n_cmds, cmds,
> +		ncmds * sizeof(struct api_struct));
> +        rpc_entry->n_cmds += ncmds;

I know it's in the tree right now, but while changing this
-- I don't see why this REALLOC/memcpy is necessary. Maybe
we can get rid of it and point to the tables directly?

Volker
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20070126/482f7c9d/attachment.bin


More information about the samba-technical mailing list