From 0be8e038d9bf90be94f3e3a7d6ea5bee88da9ecb Mon Sep 17 00:00:00 2001 From: Jeff Darcy Date: Thu, 29 Jun 2017 06:50:56 -0700 Subject: multiple: fix struct/typedef inconsistencies The most common pattern, both in our code and elsewhere, is this: struct _xyz { ... }; typedef struct _xyz xyz_t; These exceptions - especially call_frame/call_stack - have been slowing down code navigation for years. By converging on a single pattern, navigating from xyz_t in code to the actual definition of struct _xyz (i.e. without having to visit the typedef first) might even be automatable. Change-Id: I0e5dd1f51f98e000173c62ef4ddc5b21d9ec44ed Signed-off-by: Jeff Darcy Reviewed-on: https://review.gluster.org/17650 Smoke: Gluster Build System Tested-by: Jeff Darcy CentOS-regression: Gluster Build System Reviewed-by: Amar Tumballi Reviewed-by: Niels de Vos --- libglusterfs/src/stack.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'libglusterfs/src/stack.h') diff --git a/libglusterfs/src/stack.h b/libglusterfs/src/stack.h index 51698d16f5..20fbdfabff 100644 --- a/libglusterfs/src/stack.h +++ b/libglusterfs/src/stack.h @@ -16,10 +16,10 @@ #ifndef _STACK_H #define _STACK_H -struct _call_stack_t; -typedef struct _call_stack_t call_stack_t; -struct _call_frame_t; -typedef struct _call_frame_t call_frame_t; +struct _call_stack; +typedef struct _call_stack call_stack_t; +struct _call_frame; +typedef struct _call_frame call_frame_t; struct call_pool; typedef struct call_pool call_pool_t; @@ -61,7 +61,7 @@ struct call_pool { struct mem_pool *stack_mem_pool; }; -struct _call_frame_t { +struct _call_frame { call_stack_t *root; /* stack root */ call_frame_t *parent; /* previous BP */ struct list_head frames; @@ -84,7 +84,7 @@ struct _call_frame_t { #define SMALL_GROUP_COUNT 128 -struct _call_stack_t { +struct _call_stack { union { struct list_head all_frames; struct { -- cgit