From: Sami Kerola Date: Sun, 5 Mar 2017 20:52:20 +0000 (+0000) Subject: misc: stop mixing declarations and code X-Git-Tag: v2.30-rc1~193 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c308e2050f3b7cc08be64227644ce1020a27fdfe;p=thirdparty%2Futil-linux.git misc: stop mixing declarations and code Signed-off-by: Sami Kerola --- diff --git a/disk-utils/cfdisk.c b/disk-utils/cfdisk.c index f06dad1c85..cb9f3421da 100644 --- a/disk-utils/cfdisk.c +++ b/disk-utils/cfdisk.c @@ -2092,6 +2092,8 @@ static int ui_create_label(struct cfdisk *cf) do { + int key; + if (refresh_menu) { ui_draw_menu(cf); ui_hint(_("Select a type to create a new label or press 'L' to load script file.")); @@ -2099,7 +2101,7 @@ static int ui_create_label(struct cfdisk *cf) refresh_menu = 0; } - int key = getch(); + key = getch(); if (ui_resize) ui_menu_resize(cf); diff --git a/disk-utils/sfdisk.c b/disk-utils/sfdisk.c index f4f9b6b1ad..cf5dd0052a 100644 --- a/disk-utils/sfdisk.c +++ b/disk-utils/sfdisk.c @@ -1495,7 +1495,7 @@ static void follow_wipe_mode(struct sfdisk *sf) static int wipe_partition(struct sfdisk *sf, size_t partno) { int rc, yes = 0; - char *fstype = NULL;; + char *fstype = NULL; struct fdisk_partition *tmp = NULL; DBG(MISC, ul_debug("checking for signature")); diff --git a/libblkid/src/superblocks/minix.c b/libblkid/src/superblocks/minix.c index feebc96adc..b8881e574a 100644 --- a/libblkid/src/superblocks/minix.c +++ b/libblkid/src/superblocks/minix.c @@ -77,6 +77,9 @@ static int probe_minix(blkid_probe pr, unsigned char *ext; const unsigned char *data; int version = 0, swabme = 0; + unsigned long zones, ninodes, imaps, zmaps; + off_t firstz; + size_t zone_size; data = blkid_probe_get_buffer(pr, 1024, max(sizeof(struct minix_super_block), @@ -87,10 +90,6 @@ static int probe_minix(blkid_probe pr, if (version < 1) return 1; - unsigned long zones, ninodes, imaps, zmaps; - off_t firstz; - size_t zone_size; - if (version <= 2) { struct minix_super_block *sb = (struct minix_super_block *) data; diff --git a/text-utils/hexdump-display.c b/text-utils/hexdump-display.c index ce714f68cf..3e017635b4 100644 --- a/text-utils/hexdump-display.c +++ b/text-utils/hexdump-display.c @@ -299,9 +299,9 @@ void display(struct hexdump *hex) eaddress = address; } list_for_each (p, &endfu->prlist) { - pr = list_entry(p, struct hexdump_pr, prlist); - const char *color = NULL; + + pr = list_entry(p, struct hexdump_pr, prlist); if (colors_wanted() && pr->colorlist && (color = color_cond(pr, bp, pr->bcnt))) { color_enable(color);