summaryrefslogtreecommitdiffstats
path: root/usr.bin/kdump/mksubr
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2011-10-08 12:21:51 +0000
committerdes <des@FreeBSD.org>2011-10-08 12:21:51 +0000
commite7179d16fcd5543d069110847e0263dc89918724 (patch)
tree0987d12d8c305f0fded64628de35b9ff1d6976c6 /usr.bin/kdump/mksubr
parentcd04cd4a49192fa82aec3cc9cc99e0ca900b6d87 (diff)
downloadFreeBSD-src-e7179d16fcd5543d069110847e0263dc89918724.zip
FreeBSD-src-e7179d16fcd5543d069110847e0263dc89918724.tar.gz
Fix casting.
Diffstat (limited to 'usr.bin/kdump/mksubr')
-rw-r--r--usr.bin/kdump/mksubr24
1 files changed, 12 insertions, 12 deletions
diff --git a/usr.bin/kdump/mksubr b/usr.bin/kdump/mksubr
index 7cd7ea4..a3df6bd 100644
--- a/usr.bin/kdump/mksubr
+++ b/usr.bin/kdump/mksubr
@@ -252,7 +252,7 @@ semctlname(int cmd)
(void)printf("IPC_STAT");
break;
default: /* Should not reach */
- (void)printf("<invalid=%ld>", (long)cmd);
+ (void)printf("<invalid=%d>", cmd);
}
}
@@ -271,7 +271,7 @@ shmctlname(int cmd)
(void)printf("IPC_STAT");
break;
default: /* Should not reach */
- (void)printf("<invalid=%ld>", (long)cmd);
+ (void)printf("<invalid=%d>", cmd);
}
}
@@ -305,9 +305,9 @@ flagsandmodename(int flags, int mode, int decimal)
modename (mode);
} else {
if (decimal) {
- (void)printf("<unused>%ld", (long)mode);
+ (void)printf("<unused>%d", mode);
} else {
- (void)printf("<unused>%#lx", (long)mode);
+ (void)printf("<unused>%#x", (unsigned int)mode);
}
}
}
@@ -326,9 +326,9 @@ sockoptlevelname(int level, int decimal)
(void)printf("SOL_SOCKET");
} else {
if (decimal) {
- (void)printf("%ld", (long)level);
+ (void)printf("%d", level);
} else {
- (void)printf("%#lx", (long)level);
+ (void)printf("%#x", (unsigned int)level);
}
}
}
@@ -397,7 +397,7 @@ egrep "^#[[:space:]]*define[[:space:]]+F_[A-Z]+[[:space:]]+[0-9]+[[:space:]]*" \
o = $(i+1) }'
cat <<_EOF_
default: /* Should not reach */
- (void)printf("<invalid=%ld>", (long)cmd);
+ (void)printf("<invalid=%d>", cmd);
}
(void)putchar(',');
if (cmd == F_GETFD || cmd == F_SETFD) {
@@ -407,17 +407,17 @@ cat <<_EOF_
(void)printf("0");
else {
if (decimal)
- (void)printf("<invalid>%ld", (long)arg);
+ (void)printf("<invalid>%d", arg);
else
- (void)printf("<invalid>%#lx", (long)arg);
+ (void)printf("<invalid>%#x", (unsigned int)arg);
}
} else if (cmd == F_SETFL) {
flagsname(arg);
} else {
if (decimal)
- (void)printf("%ld", (long)arg);
+ (void)printf("%d", arg);
else
- (void)printf("%#lx", (long)arg);
+ (void)printf("%#x", (unsigned int)arg);
}
}
@@ -442,7 +442,7 @@ egrep "^#[[:space:]]*define[[:space:]]+RTP_[A-Z]+[[:space:]]+0x[0-9]+[[:space:]]
printf "\tcase %s:\n\t\t(void)printf(\"%s\");\n\t\tbreak;\n", $i, $i }'
cat <<_EOF_
default: /* Should not reach */
- (void)printf("<invalid=%ld>", (long)func);
+ (void)printf("<invalid=%d>", func);
}
}
OpenPOWER on IntegriCloud