From: Mathieu Desnoyers Date: Tue, 10 May 2016 02:34:25 +0000 (-0400) Subject: Use min_t/max_t macros in lttng-ust-elf.c X-Git-Tag: v2.8.0~27 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=8620f4268b34a903a9c23137dd2400fc69096b7c;p=lttng-ust.git Use min_t/max_t macros in lttng-ust-elf.c Signed-off-by: Mathieu Desnoyers --- diff --git a/liblttng-ust/lttng-ust-elf.c b/liblttng-ust/lttng-ust-elf.c index c9d2b6b3..5f27920e 100644 --- a/liblttng-ust/lttng-ust-elf.c +++ b/liblttng-ust/lttng-ust-elf.c @@ -376,9 +376,9 @@ int lttng_ust_elf_get_memsz(struct lttng_ust_elf *elf, uint64_t *memsz) goto next_loop; } - low_addr = phdr->p_vaddr < low_addr ? phdr->p_vaddr : low_addr; - high_addr = phdr->p_vaddr + phdr->p_memsz > high_addr ? - phdr->p_vaddr + phdr->p_memsz : high_addr; + low_addr = min_t(uint64_t, low_addr, phdr->p_vaddr); + high_addr = max_t(uint64_t, high_addr, + phdr->p_vaddr + phdr->p_memsz); next_loop: free(phdr); }