Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 144984
b: refs/heads/master
c: 93f1cc6
h: refs/heads/master
v: v3
  • Loading branch information
Timur Tabi authored and Benjamin Herrenschmidt committed May 15, 2009
1 parent 05b4c8b commit 45b9a19
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ba10eedf5a3fba991563873d4cb65a067aa13f24
refs/heads/master: 93f1cc609c702a83e44da51cabdd353b20c24f79
10 changes: 5 additions & 5 deletions trunk/arch/powerpc/boot/mktree.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ int main(int argc, char *argv[])
{
int in_fd, out_fd;
int nblks, i;
uint cksum, *cp;
unsigned int cksum, *cp;
struct stat st;
boot_block_t bt;

Expand Down Expand Up @@ -90,7 +90,7 @@ int main(int argc, char *argv[])

cksum = 0;
cp = (void *)&bt;
for (i=0; i<sizeof(bt)/sizeof(uint); i++)
for (i = 0; i < sizeof(bt) / sizeof(unsigned int); i++)
cksum += *cp++;

/* Assume zImage is an ELF file, and skip the 64K header.
Expand All @@ -101,7 +101,7 @@ int main(int argc, char *argv[])
exit(4);
}

if ((*(uint *)tmpbuf) != htonl(0x7f454c46)) {
if ((*(unsigned int *)tmpbuf) != htonl(0x7f454c46)) {
fprintf(stderr, "%s is not an ELF image\n", argv[1]);
exit(4);
}
Expand All @@ -125,8 +125,8 @@ int main(int argc, char *argv[])
perror("zImage read");
exit(5);
}
cp = (uint *)tmpbuf;
for (i=0; i<sizeof(tmpbuf)/sizeof(uint); i++)
cp = (unsigned int *)tmpbuf;
for (i = 0; i < sizeof(tmpbuf) / sizeof(unsigned int); i++)
cksum += *cp++;
if (write(out_fd, tmpbuf, sizeof(tmpbuf)) != sizeof(tmpbuf)) {
perror("boot-image write");
Expand Down

0 comments on commit 45b9a19

Please sign in to comment.