From 77429b06695fbdcab9387cca91611f28fad655ae Mon Sep 17 00:00:00 2001 From: Ralf Corsepius Date: Thu, 22 Oct 2009 03:21:54 +0000 Subject: Use uint_least32_t instead of u_int, force 32bit constants to make code functional on 16bit-int targets. --- cpukit/libmisc/shell/dd-args.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'cpukit/libmisc/shell') diff --git a/cpukit/libmisc/shell/dd-args.c b/cpukit/libmisc/shell/dd-args.c index 707fc11cca..8e592e8005 100644 --- a/cpukit/libmisc/shell/dd-args.c +++ b/cpukit/libmisc/shell/dd-args.c @@ -74,7 +74,7 @@ static off_t get_off_t(rtems_shell_dd_globals* globals, const char *); static const struct arg { const char *name; void (*f)(rtems_shell_dd_globals* globals, char *); - u_int set, noset; + uint_least32_t set, noset; } args[] = { { "bs", f_bs, C_BS, C_BS|C_IBS|C_OBS|C_OSYNC }, { "cbs", f_cbs, C_CBS, C_CBS }, @@ -298,7 +298,7 @@ f_skip(rtems_shell_dd_globals* globals, char *arg) static const struct conv { const char *name; - u_int set, noset; + uint_least32_t set, noset; const u_char *ctab_; } clist[] = { { "ascii", C_ASCII, C_EBCDIC, e2a_POSIX }, @@ -380,19 +380,19 @@ get_num(rtems_shell_dd_globals* globals, const char *val) switch (*expr) { case 'B': case 'b': - mult = 512; + mult = UINT32_C(512); break; case 'K': case 'k': - mult = 1 << 10; + mult = UINT32_C(1) << 10; break; case 'M': case 'm': - mult = 1 << 20; + mult = UINT32_C(1) << 20; break; case 'G': case 'g': - mult = 1 << 30; + mult = UINT32_C(1) << 30; break; case 'W': case 'w': @@ -454,19 +454,19 @@ get_off_t(rtems_shell_dd_globals* globals, const char *val) switch (*expr) { case 'B': case 'b': - mult = 512; + mult = UINT32_C(512); break; case 'K': case 'k': - mult = 1 << 10; + mult = UINT32_C(1) << 10; break; case 'M': case 'm': - mult = 1 << 20; + mult = UINT32_C(1) << 20; break; case 'G': case 'g': - mult = 1 << 30; + mult = UINT32_C(1) << 30; break; case 'W': case 'w': -- cgit v1.2.3