[CRIU] [PATCH] protobuf: Cleanup typedefs a bit

Cyrill Gorcunov gorcunov at openvz.org
Thu Jul 10 12:38:46 PDT 2014


No need to pollute typedef out of structure
statement since we don't use it in that form.
Simply typedef in place. And align members
while we're at it.

Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 protobuf.c | 33 +++++++++++++++------------------
 1 file changed, 15 insertions(+), 18 deletions(-)

diff --git a/protobuf.c b/protobuf.c
index 96f19e94de4e..b1ff39c62e8b 100644
--- a/protobuf.c
+++ b/protobuf.c
@@ -29,24 +29,21 @@
 
 #define INET_ADDR_LEN		40
 
-struct pb_pr_field_s {
-	void *data;
-	int number;
-	int depth;
-	int count;
-	char fmt[32];
-};
-
-typedef struct pb_pr_field_s pb_pr_field_t;
-
-struct pb_pr_ctrl_s {
-	void *arg;
-	int single_entry;
-	const char *pretty_fmt;
-	pb_pr_field_t cur;
-};
-
-typedef struct pb_pr_ctrl_s pb_pr_ctl_t;
+typedef struct {
+	void		*data;
+	int		number;
+	int		depth;
+	int		count;
+	char		fmt[32];
+} pb_pr_field_t;
+
+typedef struct {
+	void		*arg;
+	int		single_entry;
+	const char	*pretty_fmt;
+	pb_pr_field_t	cur;
+} pb_pr_ctl_t;
+
 typedef int (*pb_pr_show_t)(pb_pr_field_t *field);
 
 static int pb_msg_int32x(pb_pr_field_t *field)
-- 
1.9.3



More information about the CRIU mailing list