dbghelp: Don't use *_NULL constants.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2020-03-31 18:20:49 +02:00 committed by Alexandre Julliard
parent 2534c2a2d2
commit ee34cf365d
2 changed files with 6 additions and 12 deletions

View File

@ -1116,8 +1116,8 @@ static BOOL elf_load_file_from_fmap(struct process* pcs, const WCHAR* filename,
break; break;
} }
ptr += sizeof(dyn); ptr += sizeof(dyn);
} while (dyn.d_tag != DT_NULL); } while (dyn.d_tag);
if (dyn.d_tag == DT_NULL) return ret; if (!dyn.d_tag) return ret;
} }
else else
{ {
@ -1138,8 +1138,8 @@ static BOOL elf_load_file_from_fmap(struct process* pcs, const WCHAR* filename,
break; break;
} }
ptr += sizeof(dyn); ptr += sizeof(dyn);
} while (dyn.d_tag != DT_NULL); } while (dyn.d_tag);
if (dyn.d_tag == DT_NULL) return ret; if (!dyn.d_tag) return ret;
} }
} }
elf_end_find(fmap); elf_end_find(fmap);
@ -1311,7 +1311,7 @@ static BOOL elf_search_auxv(const struct process* pcs, unsigned type, ULONG_PTR*
{ {
Elf64_auxv_t auxv; Elf64_auxv_t auxv;
while (ReadProcessMemory(pcs->handle, addr, &auxv, sizeof(auxv), NULL) && auxv.a_type != AT_NULL) while (ReadProcessMemory(pcs->handle, addr, &auxv, sizeof(auxv), NULL) && auxv.a_type)
{ {
if (auxv.a_type == type) if (auxv.a_type == type)
{ {
@ -1325,7 +1325,7 @@ static BOOL elf_search_auxv(const struct process* pcs, unsigned type, ULONG_PTR*
{ {
Elf32_auxv_t auxv; Elf32_auxv_t auxv;
while (ReadProcessMemory(pcs->handle, addr, &auxv, sizeof(auxv), NULL) && auxv.a_type != AT_NULL) while (ReadProcessMemory(pcs->handle, addr, &auxv, sizeof(auxv), NULL) && auxv.a_type)
{ {
if (auxv.a_type == type) if (auxv.a_type == type)
{ {

View File

@ -48,12 +48,6 @@
#define IMAGE_NO_MAP ((void*)-1) #define IMAGE_NO_MAP ((void*)-1)
#ifndef __ELF__
#ifndef SHT_NULL
#define SHT_NULL 0
#endif
#endif
/* structure holding information while handling an ELF image /* structure holding information while handling an ELF image
* allows one by one section mapping for memory savings * allows one by one section mapping for memory savings
*/ */