mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-30 22:05:36 +00:00
protobuf: skip show of zero-size repeated fields
Print "<empty>" message for such filed instead. #2425 Signed-off-by: Andrew Vagin <avagin@parallels.com> Signed-off-by: Stanislav Kinsbursky <skinsbursky@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
committed by
Pavel Emelyanov
parent
c237a720b1
commit
eee14340e3
@@ -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;
|
unsigned long counter;
|
||||||
int done;
|
int done;
|
||||||
|
|
||||||
|
if (nr_fields == 0) {
|
||||||
|
pr_msg("<empty>");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
field->count = nr_fields;
|
field->count = nr_fields;
|
||||||
done = show(field);
|
done = show(field);
|
||||||
if (done)
|
if (done)
|
||||||
|
Reference in New Issue
Block a user