fdisk: move NAME_WIDTH out of do-while loop There's no reason to define it in every iteration. Signed-off-by: Davidlohr Bueso <dave@xxxxxxx> --- fdisk/fdisk.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/fdisk/fdisk.c b/fdisk/fdisk.c index 6829321..c27b87b 100644 --- a/fdisk/fdisk.c +++ b/fdisk/fdisk.c @@ -562,6 +562,8 @@ void list_types(struct systypes *sys) unsigned int last[4], done = 0, next = 0, size; int i; +#define NAME_WIDTH 15 + for (i = 0; sys[i].name; i++); size = i; @@ -570,7 +572,6 @@ void list_types(struct systypes *sys) i = done = 0; do { - #define NAME_WIDTH 15 char name[NAME_WIDTH * MB_LEN_MAX]; size_t width = NAME_WIDTH; -- 1.7.0.4 -- To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html