make new code like old code
Variable declarations at top of function,
separate from initialization.
Use == 0 instead of ! for checking pointers.
Consistent spacing around {, *, casts.
Declare 0-parameter functions as (void) not ().
Integer valued functions return -1 on failure, 0 on success.
This commit is contained in:
parent
240679608c
commit
1a81e38b17
21 changed files with 227 additions and 199 deletions
|
|
@ -33,7 +33,7 @@ bootmain(void)
|
|||
// Load each program segment (ignores ph flags).
|
||||
ph = (struct proghdr*)((uchar*)elf + elf->phoff);
|
||||
eph = ph + elf->phnum;
|
||||
for(; ph < eph; ph++) {
|
||||
for(; ph < eph; ph++){
|
||||
va = (uchar*)ph->va;
|
||||
readseg(va, ph->filesz, ph->offset);
|
||||
if(ph->memsz > ph->filesz)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue