aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/xd.c
diff options
context:
space:
mode:
authorRuss Cox <rsc@swtch.com>2009-02-04 20:12:48 -0800
committerRuss Cox <rsc@swtch.com>2009-02-04 20:12:48 -0800
commit1adb2a07bff16932f070a29af8460c35be34fb65 (patch)
tree0cb7a0043ffd21aea0f9cea1f97f43ad58ea7dc7 /src/cmd/xd.c
parent65a34c7fac1524cb3f40189f1bff8c3226d80710 (diff)
parent65a34c7fac1524cb3f40189f1bff8c3226d80710 (diff)
downloadplan9port-1adb2a07bff16932f070a29af8460c35be34fb65.tar.gz
plan9port-1adb2a07bff16932f070a29af8460c35be34fb65.tar.bz2
plan9port-1adb2a07bff16932f070a29af8460c35be34fb65.zip
merge
Diffstat (limited to 'src/cmd/xd.c')
-rw-r--r--src/cmd/xd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cmd/xd.c b/src/cmd/xd.c
index ab485a32..3e8ba5d3 100644
--- a/src/cmd/xd.c
+++ b/src/cmd/xd.c
@@ -288,7 +288,7 @@ void
fmt1(char *f)
{
int i;
- for(i=0; i<ndata; i+=sizeof(unsigned short))
+ for(i=0; i<ndata; i+=2)
xprint(f, (data[i]<<8)|data[i+1]);
}
@@ -296,7 +296,7 @@ void
fmt2(char *f)
{
int i;
- for(i=0; i<ndata; i+=sizeof(unsigned long))
+ for(i=0; i<ndata; i+=4)
xprint(f, (u32int)((data[i]<<24)|(data[i+1]<<16)|(data[i+2]<<8)|data[i+3]));
}
@@ -305,7 +305,7 @@ fmt3(char *f)
{
int i;
unsigned long long v;
- for(i=0; i<ndata; i+=sizeof(unsigned long long)){
+ for(i=0; i<ndata; i+=8){
v = (data[i]<<24)|(data[i+1]<<16)|(data[i+2]<<8)|data[i+3];
v <<= 32;
v |= (data[i+4]<<24)|(data[i+1+4]<<16)|(data[i+2+4]<<8)|data[i+3+4];