summaryrefslogtreecommitdiffstats
path: root/cpukit
diff options
context:
space:
mode:
authorRalf Corsepius <ralf.corsepius@rtems.org>2009-10-22 03:21:54 +0000
committerRalf Corsepius <ralf.corsepius@rtems.org>2009-10-22 03:21:54 +0000
commit77429b06695fbdcab9387cca91611f28fad655ae (patch)
tree39f200a7ef9e6171cae4da0dd2f53df813aa96d9 /cpukit
parent2009-10-22 Ralf Corsépius <ralf.corsepius@rtems.org> (diff)
downloadrtems-77429b06695fbdcab9387cca91611f28fad655ae.tar.bz2
Use uint_least32_t instead of u_int, force 32bit constants to make code functional on 16bit-int targets.
Diffstat (limited to 'cpukit')
-rw-r--r--cpukit/libmisc/shell/dd-args.c20
1 files changed, 10 insertions, 10 deletions
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':