Quoting Oren Laadan ([email protected]):
...
> +static int checkpoint_write_header(struct ckpt_ctx *ctx)
> +{
> + struct ckpt_hdr_header *h;
> + struct new_utsname *uts;
> + struct timeval ktv;
> + int ret;
> +
> + h = ckpt_hdr_get_type(ctx, sizeof(*h), CKPT_HDR_HEADER);
...
> + struct ckpt_hdr_tail *h;
> + int ret;
> +
> + h = ckpt_hdr_get_type(ctx, sizeof(*h), CKPT_HDR_TAIL);
...
> + struct ckpt_hdr_task *h;
> + int ret;
> +
> + h = ckpt_hdr_get_type(ctx, sizeof(*h), CKPT_HDR_TASK);
...
> +/**
> + * ckpt_hdr_get_type - get a hdr of certain size
> + * @ctx: checkpoint context
> + * @len: number of bytes to reserve
> + *
> + * Returns pointer to reserved space on hbuf
> + */
> +void *ckpt_hdr_get_type(struct ckpt_ctx *ctx, int len, int type)
> +{
Observation (based on all callers in later patches as well): the second
argument appears to be superfluous? You should be able to determine
based on type.
(The callers would look much friendlier without the 2nd arg imo)
-serge
_______________________________________________
Containers mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/containers
_______________________________________________
Devel mailing list
[email protected]
https://openvz.org/mailman/listinfo/devel