mirror of
https://github.com/tobast/libunwind-eh_elf.git
synced 2024-11-25 00:27:39 +01:00
Whitespace cleanup
This commit is contained in:
parent
0c0ea23cf2
commit
0628a9872c
1 changed files with 136 additions and 132 deletions
|
@ -211,8 +211,7 @@ _UCD_create(const char *filename)
|
||||||
|
|
||||||
ui->note_phdr = malloc(cur->p_filesz);
|
ui->note_phdr = malloc(cur->p_filesz);
|
||||||
if (lseek(fd, cur->p_offset, SEEK_SET) != (off_t)cur->p_offset
|
if (lseek(fd, cur->p_offset, SEEK_SET) != (off_t)cur->p_offset
|
||||||
|| (uoff_t)read(fd, ui->note_phdr, cur->p_filesz) != cur->p_filesz
|
|| (uoff_t)read(fd, ui->note_phdr, cur->p_filesz) != cur->p_filesz)
|
||||||
)
|
|
||||||
{
|
{
|
||||||
Debug(0, "Can't read PT_NOTE from '%s'\n", filename);
|
Debug(0, "Can't read PT_NOTE from '%s'\n", filename);
|
||||||
goto err;
|
goto err;
|
||||||
|
@ -228,7 +227,9 @@ _UCD_create(const char *filename)
|
||||||
Elf32_Nhdr *note_hdr = (Elf32_Nhdr *)p;
|
Elf32_Nhdr *note_hdr = (Elf32_Nhdr *)p;
|
||||||
unsigned char *p_next;
|
unsigned char *p_next;
|
||||||
|
|
||||||
p_next = p + sizeof (Elf32_Nhdr) + ((note_hdr->n_namesz + 3) & ~3L) + note_hdr->n_descsz;
|
p_next = p + sizeof (Elf32_Nhdr)
|
||||||
|
+ ((note_hdr->n_namesz + 3) & ~3L)
|
||||||
|
+ note_hdr->n_descsz;
|
||||||
|
|
||||||
if (p_next >= note_end)
|
if (p_next >= note_end)
|
||||||
break;
|
break;
|
||||||
|
@ -249,13 +250,16 @@ _UCD_create(const char *filename)
|
||||||
Elf32_Nhdr *note_hdr = (Elf32_Nhdr *)p;
|
Elf32_Nhdr *note_hdr = (Elf32_Nhdr *)p;
|
||||||
unsigned char *p_next;
|
unsigned char *p_next;
|
||||||
|
|
||||||
p_next = p + sizeof (Elf32_Nhdr) + ((note_hdr->n_namesz + 3) & ~3L) + note_hdr->n_descsz;
|
p_next = p + sizeof (Elf32_Nhdr)
|
||||||
|
+ ((note_hdr->n_namesz + 3) & ~3L)
|
||||||
|
+ note_hdr->n_descsz;
|
||||||
|
|
||||||
if (p_next >= note_end)
|
if (p_next >= note_end)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (note_hdr->n_type == NT_PRSTATUS)
|
if (note_hdr->n_type == NT_PRSTATUS)
|
||||||
ui->threads[n_threads++] = (void*) ((((long)note_hdr + sizeof(*note_hdr) + note_hdr->n_namesz) + 3) & ~3L);
|
ui->threads[n_threads++] = (void*) ((((long)note_hdr
|
||||||
|
+ sizeof(*note_hdr) + note_hdr->n_namesz) + 3) & ~3L);
|
||||||
|
|
||||||
p = p_next;
|
p = p_next;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue