On Mon, Sep 06, 2010 at 03:02:53PM -0400, Davidlohr Bueso wrote: > fdisk: move NAME_WIDTH out of do-while loop > > There's no reason to define it in every iteration. Please, refresh your calendar -- we don't have 1st April now :-) Karel PS. http://gcc.gnu.org/onlinedocs/cpp/ > --- 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; > -- Karel Zak <kzak@xxxxxxxxxx> http://karelzak.blogspot.com -- 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