[lttng-dev] [PATCH] FIX: Align buffers on 4 bytes for 64bit access

Simon Marchi simon.marchi at polymtl.ca
Thu May 15 09:34:18 EDT 2014


I suggest adding a comment above that line explaining what it does.

On 15 May 2014 04:57,  <rongqing.li at windriver.com> wrote:
> From: Fredrik Markström <fredrik.markstrom at gmail.com>
>
> Signed-off-by: Fredrik Markstr枚m <fredrik.markstrom at gmail.com>
> ---
>  formats/ctf/metadata/objstack.c |    2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/formats/ctf/metadata/objstack.c b/formats/ctf/metadata/objstack.c
> index 9e264a4..9643b9b 100644
> --- a/formats/ctf/metadata/objstack.c
> +++ b/formats/ctf/metadata/objstack.c
> @@ -118,6 +118,8 @@ void *objstack_alloc(struct objstack *objstack, size_t len)
>         struct objstack_node *last_node;
>         void *p;
>
> +       len = (len + 3) & ~3;
> +
>         /* Get last node */
>         last_node = bt_list_entry(objstack->head.prev,
>                         struct objstack_node, node);
> --
> 1.7.10.4
>
>
> _______________________________________________
> lttng-dev mailing list
> lttng-dev at lists.lttng.org
> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev



More information about the lttng-dev mailing list