aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--coreutils/ls.c4
-rw-r--r--coreutils/stty.c9
-rw-r--r--debianutils/start_stop_daemon.c9
-rw-r--r--findutils/grep.c11
-rw-r--r--miscutils/dc.c3
-rw-r--r--miscutils/fbsplash.c7
-rw-r--r--miscutils/hdparm.c2
-rw-r--r--modutils/depmod.c4
-rw-r--r--networking/arping.c7
-rw-r--r--networking/ftpgetput.c5
-rw-r--r--networking/ifenslave.c2
-rw-r--r--networking/libiproute/iproute.c2
-rw-r--r--networking/slattach.c2
-rw-r--r--networking/tcpudp.c9
-rw-r--r--networking/tftp.c4
-rw-r--r--networking/udhcp/clientpacket.c2
-rw-r--r--procps/top.c11
-rw-r--r--runit/runsv.c7
-rw-r--r--shell/hush.c4
-rw-r--r--sysklogd/logread.c7
-rw-r--r--util-linux/fsck_minix.c12
-rw-r--r--util-linux/mdev.c12
-rw-r--r--util-linux/mkfs_minix.c2
23 files changed, 62 insertions, 75 deletions
diff --git a/coreutils/ls.c b/coreutils/ls.c
index 83ad8cd00..7fddefef5 100644
--- a/coreutils/ls.c
+++ b/coreutils/ls.c
@@ -169,12 +169,12 @@ enum {
169#endif 169#endif
170#define current_time_t (G.current_time_t) 170#define current_time_t (G.current_time_t)
171/* memset: we have to zero it out because of NOEXEC */ 171/* memset: we have to zero it out because of NOEXEC */
172#define INIT_G() { \ 172#define INIT_G() do { \
173 memset(&G, 0, sizeof(G)); \ 173 memset(&G, 0, sizeof(G)); \
174 USE_FEATURE_AUTOWIDTH(tabstops = COLUMN_GAP;) \ 174 USE_FEATURE_AUTOWIDTH(tabstops = COLUMN_GAP;) \
175 USE_FEATURE_AUTOWIDTH(terminal_width = TERMINAL_WIDTH;) \ 175 USE_FEATURE_AUTOWIDTH(terminal_width = TERMINAL_WIDTH;) \
176 USE_FEATURE_LS_TIMESTAMPS(time(&current_time_t);) \ 176 USE_FEATURE_LS_TIMESTAMPS(time(&current_time_t);) \
177} 177} while (0)
178 178
179 179
180#if ENABLE_FEATURE_ASSUME_UNICODE 180#if ENABLE_FEATURE_ASSUME_UNICODE
diff --git a/coreutils/stty.c b/coreutils/stty.c
index a17955a6a..c9f11a8da 100644
--- a/coreutils/stty.c
+++ b/coreutils/stty.c
@@ -627,11 +627,10 @@ struct globals {
627 char buf[10]; 627 char buf[10];
628}; 628};
629#define G (*(struct globals*)&bb_common_bufsiz1) 629#define G (*(struct globals*)&bb_common_bufsiz1)
630#define INIT_G() \ 630#define INIT_G() do { \
631 do { \ 631 G.device_name = bb_msg_standard_input; \
632 G.device_name = bb_msg_standard_input; \ 632 G.max_col = 80; \
633 G.max_col = 80; \ 633} while (0)
634 } while (0)
635 634
636 635
637/* Return a string that is the printable representation of character CH */ 636/* Return a string that is the printable representation of character CH */
diff --git a/debianutils/start_stop_daemon.c b/debianutils/start_stop_daemon.c
index 6d7e61b42..86ec71016 100644
--- a/debianutils/start_stop_daemon.c
+++ b/debianutils/start_stop_daemon.c
@@ -105,11 +105,10 @@ struct globals {
105#define pidfile (G.pidfile ) 105#define pidfile (G.pidfile )
106#define user_id (G.user_id ) 106#define user_id (G.user_id )
107#define signal_nr (G.signal_nr ) 107#define signal_nr (G.signal_nr )
108#define INIT_G() \ 108#define INIT_G() do { \
109 do { \ 109 user_id = -1; \
110 user_id = -1; \ 110 signal_nr = 15; \
111 signal_nr = 15; \ 111} while (0)
112 } while (0)
113 112
114#ifdef OLDER_VERSION_OF_X 113#ifdef OLDER_VERSION_OF_X
115/* -x,--exec EXECUTABLE 114/* -x,--exec EXECUTABLE
diff --git a/findutils/grep.c b/findutils/grep.c
index fc7893860..9792ce479 100644
--- a/findutils/grep.c
+++ b/findutils/grep.c
@@ -103,12 +103,11 @@ struct globals {
103 const char *cur_file; /* the current file we are reading */ 103 const char *cur_file; /* the current file we are reading */
104}; 104};
105#define G (*(struct globals*)&bb_common_bufsiz1) 105#define G (*(struct globals*)&bb_common_bufsiz1)
106#define INIT_G() \ 106#define INIT_G() do { \
107 do { \ 107 struct G_sizecheck { \
108 struct G_sizecheck { \ 108 char G_sizecheck[sizeof(G) > COMMON_BUFSIZE ? -1 : 1]; \
109 char G_sizecheck[sizeof(G) > COMMON_BUFSIZE ? -1 : 1]; \ 109 }; \
110 }; \ 110} while (0)
111 } while (0)
112#define max_matches (G.max_matches ) 111#define max_matches (G.max_matches )
113#define reflags (G.reflags ) 112#define reflags (G.reflags )
114#define invert_search (G.invert_search ) 113#define invert_search (G.invert_search )
diff --git a/miscutils/dc.c b/miscutils/dc.c
index 193929c8e..bd93ef68b 100644
--- a/miscutils/dc.c
+++ b/miscutils/dc.c
@@ -19,8 +19,7 @@ enum { STACK_SIZE = (COMMON_BUFSIZE - offsetof(struct globals, stack)) / sizeof(
19#define pointer (G.pointer ) 19#define pointer (G.pointer )
20#define base (G.base ) 20#define base (G.base )
21#define stack (G.stack ) 21#define stack (G.stack )
22#define INIT_G() do { \ 22#define INIT_G() do { } while (0)
23} while (0)
24 23
25 24
26static void push(double a) 25static void push(double a)
diff --git a/miscutils/fbsplash.c b/miscutils/fbsplash.c
index 626cefb28..07350b0cc 100644
--- a/miscutils/fbsplash.c
+++ b/miscutils/fbsplash.c
@@ -50,10 +50,9 @@ struct globals {
50 struct fb_fix_screeninfo scr_fix; 50 struct fb_fix_screeninfo scr_fix;
51}; 51};
52#define G (*ptr_to_globals) 52#define G (*ptr_to_globals)
53#define INIT_G() \ 53#define INIT_G() do { \
54 do { \ 54 SET_PTR_TO_GLOBALS(xzalloc(sizeof(G))); \
55 SET_PTR_TO_GLOBALS(xzalloc(sizeof(G))); \ 55} while (0)
56 } while (0)
57 56
58 57
59#if DEBUG 58#if DEBUG
diff --git a/miscutils/hdparm.c b/miscutils/hdparm.c
index 983de6d7b..a5d5b05cd 100644
--- a/miscutils/hdparm.c
+++ b/miscutils/hdparm.c
@@ -1251,7 +1251,7 @@ static void dump_identity(const struct hd_driveid *id)
1251 .masks = { 0x100, 0x001, 0x200, 0x002, 0x400, 0x004 }, 1251 .masks = { 0x100, 0x001, 0x200, 0x002, 0x400, 0x004 },
1252 .labels = "*\0""udma0 \0""*\0""udma1 \0""*\0""udma2 \0", 1252 .labels = "*\0""udma0 \0""*\0""udma1 \0""*\0""udma2 \0",
1253 }; 1253 };
1254 1254
1255 printf("\n UDMA modes: "); 1255 printf("\n UDMA modes: ");
1256 print_flags(&ultra_modes1, id->dma_ultra); 1256 print_flags(&ultra_modes1, id->dma_ultra);
1257#ifdef __NEW_HD_DRIVE_ID 1257#ifdef __NEW_HD_DRIVE_ID
diff --git a/modutils/depmod.c b/modutils/depmod.c
index 4998d641d..fdeb7dcf1 100644
--- a/modutils/depmod.c
+++ b/modutils/depmod.c
@@ -174,7 +174,7 @@ int depmod_main(int ATTRIBUTE_UNUSED argc, char **argv)
174 /* Fixup the module names in the depends list */ 174 /* Fixup the module names in the depends list */
175 while (mods) { 175 while (mods) {
176 llist_t *deps = NULL, *old_deps = mods->dependencies; 176 llist_t *deps = NULL, *old_deps = mods->dependencies;
177 177
178 while (old_deps) { 178 while (old_deps) {
179 dep_lst_t *all = G.lst; 179 dep_lst_t *all = G.lst;
180 char *longname = NULL; 180 char *longname = NULL;
@@ -262,7 +262,7 @@ int depmod_main(int ATTRIBUTE_UNUSED argc, char **argv)
262 char *tmp = strrstr(shortname, ".ko"); 262 char *tmp = strrstr(shortname, ".ko");
263 263
264 *tmp = '\0'; 264 *tmp = '\0';
265 265
266 while (mods->aliases) { 266 while (mods->aliases) {
267 fprintf(filedes, "alias %s %s\n", 267 fprintf(filedes, "alias %s %s\n",
268 (char*)llist_pop(&mods->aliases), 268 (char*)llist_pop(&mods->aliases),
diff --git a/networking/arping.c b/networking/arping.c
index 2db2ff412..0a444f15c 100644
--- a/networking/arping.c
+++ b/networking/arping.c
@@ -61,10 +61,9 @@ struct globals {
61#define received (G.received ) 61#define received (G.received )
62#define brd_recv (G.brd_recv ) 62#define brd_recv (G.brd_recv )
63#define req_recv (G.req_recv ) 63#define req_recv (G.req_recv )
64#define INIT_G() \ 64#define INIT_G() do { \
65 do { \ 65 count = -1; \
66 count = -1; \ 66} while (0)
67 } while (0)
68 67
69// If GNUisms are not available... 68// If GNUisms are not available...
70//static void *mempcpy(void *_dst, const void *_src, int n) 69//static void *mempcpy(void *_dst, const void *_src, int n)
diff --git a/networking/ftpgetput.c b/networking/ftpgetput.c
index be3d5a673..f732d02a4 100644
--- a/networking/ftpgetput.c
+++ b/networking/ftpgetput.c
@@ -27,7 +27,7 @@ struct globals {
27#define G (*(struct globals*)&bb_common_bufsiz1) 27#define G (*(struct globals*)&bb_common_bufsiz1)
28enum { BUFSZ = COMMON_BUFSIZE - offsetof(struct globals, buf) }; 28enum { BUFSZ = COMMON_BUFSIZE - offsetof(struct globals, buf) };
29struct BUG_G_too_big { 29struct BUG_G_too_big {
30 char BUG_G_too_big[sizeof(G) <= COMMON_BUFSIZE ? 1 : -1]; 30 char BUG_G_too_big[sizeof(G) <= COMMON_BUFSIZE ? 1 : -1];
31}; 31};
32#define user (G.user ) 32#define user (G.user )
33#define password (G.password ) 33#define password (G.password )
@@ -36,8 +36,7 @@ struct BUG_G_too_big {
36#define verbose_flag (G.verbose_flag ) 36#define verbose_flag (G.verbose_flag )
37#define do_continue (G.do_continue ) 37#define do_continue (G.do_continue )
38#define buf (G.buf ) 38#define buf (G.buf )
39#define INIT_G() do { \ 39#define INIT_G() do { } while (0)
40} while (0)
41 40
42 41
43static void ftp_die(const char *msg) ATTRIBUTE_NORETURN; 42static void ftp_die(const char *msg) ATTRIBUTE_NORETURN;
diff --git a/networking/ifenslave.c b/networking/ifenslave.c
index fed186967..4c7eadc83 100644
--- a/networking/ifenslave.c
+++ b/networking/ifenslave.c
@@ -147,7 +147,7 @@ static int ioctl_on_skfd(unsigned request, struct ifreq *ifr)
147 147
148static int set_ifrname_and_do_ioctl(unsigned request, struct ifreq *ifr, const char *ifname) 148static int set_ifrname_and_do_ioctl(unsigned request, struct ifreq *ifr, const char *ifname)
149{ 149{
150 strncpy_IFNAMSIZ(ifr->ifr_name, ifname); 150 strncpy_IFNAMSIZ(ifr->ifr_name, ifname);
151 return ioctl_on_skfd(request, ifr); 151 return ioctl_on_skfd(request, ifr);
152} 152}
153 153
diff --git a/networking/libiproute/iproute.c b/networking/libiproute/iproute.c
index 6977a0956..354442c4e 100644
--- a/networking/libiproute/iproute.c
+++ b/networking/libiproute/iproute.c
@@ -582,7 +582,7 @@ static int iproute_list_or_flush(char **argv, int flush)
582 if (rtnl_rttable_a2n(&tid, *argv)) 582 if (rtnl_rttable_a2n(&tid, *argv))
583 invarg(*argv, "table"); 583 invarg(*argv, "table");
584 filter.tb = tid; 584 filter.tb = tid;
585#else 585#else
586 invarg(*argv, "table"); 586 invarg(*argv, "table");
587#endif 587#endif
588 } 588 }
diff --git a/networking/slattach.c b/networking/slattach.c
index 96dec7e5f..02ecb5e9f 100644
--- a/networking/slattach.c
+++ b/networking/slattach.c
@@ -25,7 +25,7 @@ struct globals {
25#define handle (G.handle ) 25#define handle (G.handle )
26#define saved_disc (G.saved_disc ) 26#define saved_disc (G.saved_disc )
27#define saved_state (G.saved_state ) 27#define saved_state (G.saved_state )
28#define INIT_G() do {} while (0) 28#define INIT_G() do { } while (0)
29 29
30 30
31/* 31/*
diff --git a/networking/tcpudp.c b/networking/tcpudp.c
index 07a87b8ed..561d1324c 100644
--- a/networking/tcpudp.c
+++ b/networking/tcpudp.c
@@ -59,11 +59,10 @@ struct globals {
59#define cmax (G.cmax ) 59#define cmax (G.cmax )
60#define env_cur (G.env_cur ) 60#define env_cur (G.env_cur )
61#define env_var (G.env_var ) 61#define env_var (G.env_var )
62#define INIT_G() \ 62#define INIT_G() do { \
63 do { \ 63 cmax = 30; \
64 cmax = 30; \ 64 env_cur = &env_var[0]; \
65 env_cur = &env_var[0]; \ 65} while (0)
66 } while (0)
67 66
68 67
69/* We have to be careful about leaking memory in repeated setenv's */ 68/* We have to be careful about leaking memory in repeated setenv's */
diff --git a/networking/tftp.c b/networking/tftp.c
index 63e045dfb..c61cde9d5 100644
--- a/networking/tftp.c
+++ b/networking/tftp.c
@@ -92,9 +92,7 @@ struct globals {
92#define block_buf (G.block_buf ) 92#define block_buf (G.block_buf )
93#define user_opt (G.user_opt ) 93#define user_opt (G.user_opt )
94#define error_pkt (G.error_pkt ) 94#define error_pkt (G.error_pkt )
95#define INIT_G() \ 95#define INIT_G() do { } while (0)
96 do { \
97 } while (0)
98 96
99#define error_pkt_reason (error_pkt[3]) 97#define error_pkt_reason (error_pkt[3])
100#define error_pkt_str (error_pkt + 4) 98#define error_pkt_str (error_pkt + 4)
diff --git a/networking/udhcp/clientpacket.c b/networking/udhcp/clientpacket.c
index c562c1200..3e4561946 100644
--- a/networking/udhcp/clientpacket.c
+++ b/networking/udhcp/clientpacket.c
@@ -64,7 +64,7 @@ static void add_param_req_option(struct dhcpMessage *packet)
64 64
65 for (i = 0; (c = dhcp_options[i].code) != 0; i++) { 65 for (i = 0; (c = dhcp_options[i].code) != 0; i++) {
66 if (((dhcp_options[i].flags & OPTION_REQ) 66 if (((dhcp_options[i].flags & OPTION_REQ)
67 && !client_config.no_default_options) 67 && !client_config.no_default_options)
68 || (client_config.opt_mask[c >> 3] & (1 << (c & 7))) 68 || (client_config.opt_mask[c >> 3] & (1 << (c & 7)))
69 ) { 69 ) {
70 packet->options[end + OPT_DATA + len] = c; 70 packet->options[end + OPT_DATA + len] = c;
diff --git a/procps/top.c b/procps/top.c
index b861deb66..0e1b333a1 100644
--- a/procps/top.c
+++ b/procps/top.c
@@ -89,12 +89,11 @@ struct globals {
89enum { LINE_BUF_SIZE = COMMON_BUFSIZE - offsetof(struct globals, line_buf) }; 89enum { LINE_BUF_SIZE = COMMON_BUFSIZE - offsetof(struct globals, line_buf) };
90 90
91#define G (*(struct globals*)&bb_common_bufsiz1) 91#define G (*(struct globals*)&bb_common_bufsiz1)
92#define INIT_G() \ 92#define INIT_G() do { \
93 do { \ 93 struct G_sizecheck { \
94 struct G_sizecheck { \ 94 char G_sizecheck[sizeof(G) > COMMON_BUFSIZE ? -1 : 1]; \
95 char G_sizecheck[sizeof(G) > COMMON_BUFSIZE ? -1 : 1]; \ 95 }; \
96 }; \ 96} while (0)
97 } while (0)
98#define top (G.top ) 97#define top (G.top )
99#define ntop (G.ntop ) 98#define ntop (G.ntop )
100#define sort_field (G.sort_field ) 99#define sort_field (G.sort_field )
diff --git a/runit/runsv.c b/runit/runsv.c
index e3b507d25..6981fa774 100644
--- a/runit/runsv.c
+++ b/runit/runsv.c
@@ -103,10 +103,9 @@ struct globals {
103#define logpipe (G.logpipe ) 103#define logpipe (G.logpipe )
104#define dir (G.dir ) 104#define dir (G.dir )
105#define svd (G.svd ) 105#define svd (G.svd )
106#define INIT_G() \ 106#define INIT_G() do { \
107 do { \ 107 pidchanged = 1; \
108 pidchanged = 1; \ 108} while (0)
109 } while (0)
110 109
111static void fatal2_cannot(const char *m1, const char *m2) 110static void fatal2_cannot(const char *m1, const char *m2)
112{ 111{
diff --git a/shell/hush.c b/shell/hush.c
index ace0cdafc..032482c6d 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -1063,7 +1063,7 @@ static int o_save_ptr_helper(o_string *o, int n)
1063 /* list[n] points to string_start, make space for 16 more pointers */ 1063 /* list[n] points to string_start, make space for 16 more pointers */
1064 o->maxlen += 0x10 * sizeof(list[0]); 1064 o->maxlen += 0x10 * sizeof(list[0]);
1065 o->data = xrealloc(o->data, o->maxlen + 1); 1065 o->data = xrealloc(o->data, o->maxlen + 1);
1066 list = (char**)o->data; 1066 list = (char**)o->data;
1067 memmove(list + n + 0x10, list + n, string_len); 1067 memmove(list + n + 0x10, list + n, string_len);
1068 o->length += 0x10 * sizeof(list[0]); 1068 o->length += 0x10 * sizeof(list[0]);
1069 } else 1069 } else
@@ -3018,7 +3018,7 @@ static void done_pipe(struct p_context *ctx, pipe_style type)
3018 /* Create the memory for child, roughly: 3018 /* Create the memory for child, roughly:
3019 * ctx->pipe->progs = new struct child_prog; 3019 * ctx->pipe->progs = new struct child_prog;
3020 * ctx->pipe->progs[0].family = ctx->pipe; 3020 * ctx->pipe->progs[0].family = ctx->pipe;
3021 * ctx->child = &ctx->pipe->progs[0]; 3021 * ctx->child = &ctx->pipe->progs[0];
3022 */ 3022 */
3023 done_command(ctx); 3023 done_command(ctx);
3024 } 3024 }
diff --git a/sysklogd/logread.c b/sysklogd/logread.c
index ace246fc4..1753ce324 100644
--- a/sysklogd/logread.c
+++ b/sysklogd/logread.c
@@ -39,10 +39,9 @@ struct globals {
39#define SMrup (G.SMrup) 39#define SMrup (G.SMrup)
40#define SMrdn (G.SMrdn) 40#define SMrdn (G.SMrdn)
41#define shbuf (G.shbuf) 41#define shbuf (G.shbuf)
42#define INIT_G() \ 42#define INIT_G() do { \
43 do { \ 43 memcpy(SMrup, init_sem, sizeof(init_sem)); \
44 memcpy(SMrup, init_sem, sizeof(init_sem)); \ 44} while (0)
45 } while (0)
46 45
47static void error_exit(const char *str) ATTRIBUTE_NORETURN; 46static void error_exit(const char *str) ATTRIBUTE_NORETURN;
48static void error_exit(const char *str) 47static void error_exit(const char *str)
diff --git a/util-linux/fsck_minix.c b/util-linux/fsck_minix.c
index 3ebc07661..dba52417e 100644
--- a/util-linux/fsck_minix.c
+++ b/util-linux/fsck_minix.c
@@ -244,15 +244,15 @@ static ALWAYS_INLINE unsigned div_roundup(unsigned size, unsigned n)
244 return (size + n-1) / n; 244 return (size + n-1) / n;
245} 245}
246 246
247#if ENABLE_FEATURE_MINIX2 247#if !ENABLE_FEATURE_MINIX2
248#define INODE_BLOCKS div_roundup(INODES, (version2 ? MINIX2_INODES_PER_BLOCK \ 248#define INODE_BLOCKS div_roundup(INODES, MINIX1_INODES_PER_BLOCK)
249 : MINIX1_INODES_PER_BLOCK))
250#else 249#else
251#define INODE_BLOCKS div_roundup(INODES, MINIX1_INODES_PER_BLOCK) 250#define INODE_BLOCKS div_roundup(INODES, \
251 (version2 ? MINIX2_INODES_PER_BLOCK : MINIX1_INODES_PER_BLOCK))
252#endif 252#endif
253 253
254#define INODE_BUFFER_SIZE (INODE_BLOCKS * BLOCK_SIZE) 254#define INODE_BUFFER_SIZE (INODE_BLOCKS * BLOCK_SIZE)
255#define NORM_FIRSTZONE (2 + IMAPS + ZMAPS + INODE_BLOCKS) 255#define NORM_FIRSTZONE (2 + IMAPS + ZMAPS + INODE_BLOCKS)
256 256
257/* Before you ask "where they come from?": */ 257/* Before you ask "where they come from?": */
258/* setbit/clrbit are supplied by sys/param.h */ 258/* setbit/clrbit are supplied by sys/param.h */
diff --git a/util-linux/mdev.c b/util-linux/mdev.c
index 057b9e4ff..e1edd2073 100644
--- a/util-linux/mdev.c
+++ b/util-linux/mdev.c
@@ -300,9 +300,9 @@ static void make_device(char *path, int delete)
300 300
301/* File callback for /sys/ traversal */ 301/* File callback for /sys/ traversal */
302static int fileAction(const char *fileName, 302static int fileAction(const char *fileName,
303 struct stat *statbuf ATTRIBUTE_UNUSED, 303 struct stat *statbuf ATTRIBUTE_UNUSED,
304 void *userData, 304 void *userData,
305 int depth ATTRIBUTE_UNUSED) 305 int depth ATTRIBUTE_UNUSED)
306{ 306{
307 size_t len = strlen(fileName) - 4; /* can't underflow */ 307 size_t len = strlen(fileName) - 4; /* can't underflow */
308 char *scratch = userData; 308 char *scratch = userData;
@@ -320,9 +320,9 @@ static int fileAction(const char *fileName,
320 320
321/* Directory callback for /sys/ traversal */ 321/* Directory callback for /sys/ traversal */
322static int dirAction(const char *fileName ATTRIBUTE_UNUSED, 322static int dirAction(const char *fileName ATTRIBUTE_UNUSED,
323 struct stat *statbuf ATTRIBUTE_UNUSED, 323 struct stat *statbuf ATTRIBUTE_UNUSED,
324 void *userData ATTRIBUTE_UNUSED, 324 void *userData ATTRIBUTE_UNUSED,
325 int depth) 325 int depth)
326{ 326{
327 return (depth >= MAX_SYSFS_DEPTH ? SKIP : TRUE); 327 return (depth >= MAX_SYSFS_DEPTH ? SKIP : TRUE);
328} 328}
diff --git a/util-linux/mkfs_minix.c b/util-linux/mkfs_minix.c
index 60031a5c3..49b1d4cca 100644
--- a/util-linux/mkfs_minix.c
+++ b/util-linux/mkfs_minix.c
@@ -149,7 +149,7 @@ static ALWAYS_INLINE unsigned div_roundup(unsigned size, unsigned n)
149#else 149#else
150# define SB_ZONES (version2 ? SB.s_zones : SB.s_nzones) 150# define SB_ZONES (version2 ? SB.s_zones : SB.s_nzones)
151# define INODE_BLOCKS div_roundup(SB_INODES, \ 151# define INODE_BLOCKS div_roundup(SB_INODES, \
152 version2 ? MINIX2_INODES_PER_BLOCK : MINIX1_INODES_PER_BLOCK) 152 (version2 ? MINIX2_INODES_PER_BLOCK : MINIX1_INODES_PER_BLOCK))
153#endif 153#endif
154 154
155#define INODE_BUFFER_SIZE (INODE_BLOCKS * BLOCK_SIZE) 155#define INODE_BUFFER_SIZE (INODE_BLOCKS * BLOCK_SIZE)