Module: wine Branch: master Commit: ee34cf365d34b23669c2ead03b040f09b7fb1e2b URL: https://source.winehq.org/git/wine.git/?a=commit;h=ee34cf365d34b23669c2ead03...
Author: Jacek Caban jacek@codeweavers.com Date: Tue Mar 31 18:20:49 2020 +0200
dbghelp: Don't use *_NULL constants.
Signed-off-by: Jacek Caban jacek@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/dbghelp/elf_module.c | 12 ++++++------ dlls/dbghelp/image_private.h | 6 ------ 2 files changed, 6 insertions(+), 12 deletions(-)
diff --git a/dlls/dbghelp/elf_module.c b/dlls/dbghelp/elf_module.c index 196ebcaded..4019bcf777 100644 --- a/dlls/dbghelp/elf_module.c +++ b/dlls/dbghelp/elf_module.c @@ -1116,8 +1116,8 @@ static BOOL elf_load_file_from_fmap(struct process* pcs, const WCHAR* filename, break; } ptr += sizeof(dyn); - } while (dyn.d_tag != DT_NULL); - if (dyn.d_tag == DT_NULL) return ret; + } while (dyn.d_tag); + if (!dyn.d_tag) return ret; } else { @@ -1138,8 +1138,8 @@ static BOOL elf_load_file_from_fmap(struct process* pcs, const WCHAR* filename, break; } ptr += sizeof(dyn); - } while (dyn.d_tag != DT_NULL); - if (dyn.d_tag == DT_NULL) return ret; + } while (dyn.d_tag); + if (!dyn.d_tag) return ret; } } 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;
- 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) { @@ -1325,7 +1325,7 @@ static BOOL elf_search_auxv(const struct process* pcs, unsigned type, ULONG_PTR* { 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) { diff --git a/dlls/dbghelp/image_private.h b/dlls/dbghelp/image_private.h index cd15146a36..d2a89bd7c5 100644 --- a/dlls/dbghelp/image_private.h +++ b/dlls/dbghelp/image_private.h @@ -48,12 +48,6 @@
#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 * allows one by one section mapping for memory savings */