[CRIU] [PATCH] protobuf: skip show of zero-size repeated fields
Andrew Vagin
avagin at parallels.com
Tue Nov 6 07:40:45 EST 2012
On Tue, Nov 06, 2012 at 04:20:10PM +0400, Kinsbursky Stanislav wrote:
> From: Stanislav Kinsbursky <skinsbursky at openvz.org>
Here should be Vagin Andrey <avagin at openvz.org> ;)
Acked-by: Andrew Vagin <avagin at parallels.com>
>
> Print "<empty>" message for such filed instead.
>
> http://bugzilla.openvz.org/show_bug.cgi?id=2425
>
> Signed-off-by: Stanislav Kinsbursky <skinsbursky at openvz.org>
> ---
> protobuf.c | 5 +++++
> 1 files changed, 5 insertions(+), 0 deletions(-)
> diff --git a/protobuf.c b/protobuf.c
> index cf86297..7f76e13 100644
> --- a/protobuf.c
> +++ b/protobuf.c
> @@ -405,6 +405,11 @@ static void pb_show_repeated(pb_pr_ctl_t *ctl, int nr_fields, pb_pr_show_t show,
> unsigned long counter;
> int done;
>
> + if (nr_fields == 0) {
> + pr_msg("<empty>");
> + return;
> + }
> +
> field->count = nr_fields;
> done = show(field);
> if (done)
> _______________________________________________
> CRIU mailing list
> CRIU at openvz.org
> http://lists.openvz.org/mailman/listinfo/criu
More information about the CRIU
mailing list