2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-31 06:15:24 +00:00

protobuf: simplify plain show logic

__pb_show_msg() is redundant.

Signed-off-by: Stanislav Kinsbursky <skinsbursky@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Stanislav Kinsbursky
2012-07-19 14:54:27 +04:00
committed by Pavel Emelyanov
parent 0c54b67b88
commit 92e6a30904
2 changed files with 4 additions and 10 deletions

View File

@@ -42,12 +42,12 @@ static void pb_msg_unk(void *obj, void *arg)
pr_msg("unknown object %p\n", obj);
}
static void __pb_show_msg(const void *msg, const ProtobufCMessageDescriptor *md);
static void pb_show_msg(const void *msg, const ProtobufCMessageDescriptor *md);
static void show_nested_message(void *msg, void *md)
{
pr_msg("[ ");
__pb_show_msg(msg, md);
pb_show_msg(msg, md);
pr_msg(" ] ");
}
@@ -132,7 +132,7 @@ static void pb_show_field(const ProtobufCFieldDescriptor *fd, void *where,
pr_msg(" ");
}
static void __pb_show_msg(const void *msg, const ProtobufCMessageDescriptor *md)
static void pb_show_msg(const void *msg, const ProtobufCMessageDescriptor *md)
{
int i;
@@ -158,12 +158,6 @@ static void __pb_show_msg(const void *msg, const ProtobufCMessageDescriptor *md)
}
}
void pb_show_msg(const void *msg, const void *msg_desc)
{
__pb_show_msg(msg, msg_desc);
pr_msg("\n");
}
void do_pb_show_plain(int fd, const ProtobufCMessageDescriptor *md,
pb_unpack_t unpack, pb_free_t free)
{
@@ -174,6 +168,7 @@ void do_pb_show_plain(int fd, const ProtobufCMessageDescriptor *md,
break;
pb_show_msg(obj, md);
pr_msg("\n");
free(obj, NULL);
}
}