[CRIU] [PATCH] protobuf: style change - move switch case's one tab
to the left
Kinsbursky Stanislav
skinsbursky at openvz.org
Fri Jul 27 10:11:46 EDT 2012
Signed-off-by: Stanislav Kinsbursky <skinsbursky at openvz.org>
---
protobuf.c | 112 ++++++++++++++++++++++++++++++------------------------------
1 files changed, 56 insertions(+), 56 deletions(-)
diff --git a/protobuf.c b/protobuf.c
index 486e0f2..420357c 100644
--- a/protobuf.c
+++ b/protobuf.c
@@ -119,28 +119,28 @@ static void show_enum(void *msg, void *arg)
static size_t get_field_size(int type)
{
switch (type) {
- case PROTOBUF_C_TYPE_INT32:
- case PROTOBUF_C_TYPE_SINT32:
- case PROTOBUF_C_TYPE_UINT32:
- case PROTOBUF_C_TYPE_SFIXED32:
- case PROTOBUF_C_TYPE_ENUM:
- case PROTOBUF_C_TYPE_FLOAT:
- return 4;
- case PROTOBUF_C_TYPE_INT64:
- case PROTOBUF_C_TYPE_SINT64:
- case PROTOBUF_C_TYPE_SFIXED64:
- case PROTOBUF_C_TYPE_FIXED32:
- case PROTOBUF_C_TYPE_UINT64:
- case PROTOBUF_C_TYPE_FIXED64:
- case PROTOBUF_C_TYPE_DOUBLE:
- return 8;
- case PROTOBUF_C_TYPE_STRING:
- case PROTOBUF_C_TYPE_MESSAGE:
- return sizeof (void *);
- case PROTOBUF_C_TYPE_BOOL:
- return sizeof (protobuf_c_boolean);
- case PROTOBUF_C_TYPE_BYTES:
- return sizeof (ProtobufCBinaryData);
+ case PROTOBUF_C_TYPE_INT32:
+ case PROTOBUF_C_TYPE_SINT32:
+ case PROTOBUF_C_TYPE_UINT32:
+ case PROTOBUF_C_TYPE_SFIXED32:
+ case PROTOBUF_C_TYPE_ENUM:
+ case PROTOBUF_C_TYPE_FLOAT:
+ return 4;
+ case PROTOBUF_C_TYPE_INT64:
+ case PROTOBUF_C_TYPE_SINT64:
+ case PROTOBUF_C_TYPE_SFIXED64:
+ case PROTOBUF_C_TYPE_FIXED32:
+ case PROTOBUF_C_TYPE_UINT64:
+ case PROTOBUF_C_TYPE_FIXED64:
+ case PROTOBUF_C_TYPE_DOUBLE:
+ return 8;
+ case PROTOBUF_C_TYPE_STRING:
+ case PROTOBUF_C_TYPE_MESSAGE:
+ return sizeof (void *);
+ case PROTOBUF_C_TYPE_BOOL:
+ return sizeof (protobuf_c_boolean);
+ case PROTOBUF_C_TYPE_BYTES:
+ return sizeof (ProtobufCBinaryData);
}
return 0;
}
@@ -157,40 +157,40 @@ static void pb_show_field(const ProtobufCFieldDescriptor *fd, void *where,
BUG_ON(fsize == 0);
switch (fd->type) {
- case PROTOBUF_C_TYPE_INT32:
- case PROTOBUF_C_TYPE_SINT32:
- case PROTOBUF_C_TYPE_UINT32:
- case PROTOBUF_C_TYPE_SFIXED32:
- show = pb_msg_int32x;
- break;
- case PROTOBUF_C_TYPE_INT64:
- case PROTOBUF_C_TYPE_SINT64:
- case PROTOBUF_C_TYPE_SFIXED64:
- case PROTOBUF_C_TYPE_FIXED32:
- case PROTOBUF_C_TYPE_UINT64:
- case PROTOBUF_C_TYPE_FIXED64:
- show = pb_msg_int64x;
- break;
- case PROTOBUF_C_TYPE_STRING:
- show = pb_msg_string;
- break;
- case PROTOBUF_C_TYPE_MESSAGE:
- where = (void *)(*(long *)where);
- ctl->arg = (void *)fd->descriptor;
- show = show_nested_message;
- break;
- case PROTOBUF_C_TYPE_ENUM:
- show = show_enum;
- ctl->arg = (void *)fd->descriptor;
- break;
- case PROTOBUF_C_TYPE_FLOAT:
- case PROTOBUF_C_TYPE_DOUBLE:
- case PROTOBUF_C_TYPE_BOOL:
- case PROTOBUF_C_TYPE_BYTES:
- default:
- show = pb_msg_unk;
- nr_fields = 1;
- break;
+ case PROTOBUF_C_TYPE_INT32:
+ case PROTOBUF_C_TYPE_SINT32:
+ case PROTOBUF_C_TYPE_UINT32:
+ case PROTOBUF_C_TYPE_SFIXED32:
+ show = pb_msg_int32x;
+ break;
+ case PROTOBUF_C_TYPE_INT64:
+ case PROTOBUF_C_TYPE_SINT64:
+ case PROTOBUF_C_TYPE_SFIXED64:
+ case PROTOBUF_C_TYPE_FIXED32:
+ case PROTOBUF_C_TYPE_UINT64:
+ case PROTOBUF_C_TYPE_FIXED64:
+ show = pb_msg_int64x;
+ break;
+ case PROTOBUF_C_TYPE_STRING:
+ show = pb_msg_string;
+ break;
+ case PROTOBUF_C_TYPE_MESSAGE:
+ where = (void *)(*(long *)where);
+ ctl->arg = (void *)fd->descriptor;
+ show = show_nested_message;
+ break;
+ case PROTOBUF_C_TYPE_ENUM:
+ show = show_enum;
+ ctl->arg = (void *)fd->descriptor;
+ break;
+ case PROTOBUF_C_TYPE_FLOAT:
+ case PROTOBUF_C_TYPE_DOUBLE:
+ case PROTOBUF_C_TYPE_BOOL:
+ case PROTOBUF_C_TYPE_BYTES:
+ default:
+ show = pb_msg_unk;
+ nr_fields = 1;
+ break;
}
if (ctl->pretty_array) {
More information about the CRIU
mailing list