Style: Shorten a couple of lines with u_int and u_long.
This commit is contained in:
parent
e150f641d0
commit
f195a1221f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=165070
@ -618,8 +618,7 @@ show_var(int *oid, int nlen)
|
|||||||
while (len >= sizeof(int)) {
|
while (len >= sizeof(int)) {
|
||||||
fputs(val, stdout);
|
fputs(val, stdout);
|
||||||
if (*fmt == 'U')
|
if (*fmt == 'U')
|
||||||
printf(hflag ? "%'u" : "%u",
|
printf(hflag ? "%'u" : "%u", *(u_int *)p);
|
||||||
*(unsigned int *)p);
|
|
||||||
else if (*fmt == 'X')
|
else if (*fmt == 'X')
|
||||||
printf(hflag ? "%'#010x" : "%#010x",
|
printf(hflag ? "%'#010x" : "%#010x",
|
||||||
*(unsigned int *)p);
|
*(unsigned int *)p);
|
||||||
@ -646,11 +645,10 @@ show_var(int *oid, int nlen)
|
|||||||
while (len >= sizeof(long)) {
|
while (len >= sizeof(long)) {
|
||||||
fputs(val, stdout);
|
fputs(val, stdout);
|
||||||
if (*fmt == 'U')
|
if (*fmt == 'U')
|
||||||
printf(hflag ? "%'lu" : "%lu",
|
printf(hflag ? "%'lu" : "%lu", *(u_long *)p);
|
||||||
*(unsigned long *)p);
|
|
||||||
else if (*fmt == 'X')
|
else if (*fmt == 'X')
|
||||||
printf(hflag ? "%'#018lx" : "%#018lx",
|
printf(hflag ? "%'#018lx" : "%#018lx",
|
||||||
*(unsigned long *)p);
|
*(u_long *)p);
|
||||||
else if (*fmt == 'K') {
|
else if (*fmt == 'K') {
|
||||||
if (*(long *)p < 0)
|
if (*(long *)p < 0)
|
||||||
printf("%ld", *(long *)p);
|
printf("%ld", *(long *)p);
|
||||||
|
Loading…
Reference in New Issue
Block a user