[PATCH v1] configure: fix malloc check

Olaf Hering posted 1 patch 3 years, 9 months ago
Test checkpatch passed
Test docker-mingw@fedora passed
Test FreeBSD passed
Test docker-quick@centos7 passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20200707171326.16422-1-olaf@aepfle.de
configure | 1 +
1 file changed, 1 insertion(+)
[PATCH v1] configure: fix malloc check
Posted by Olaf Hering 3 years, 9 months ago
Avoid random return value.

Fixes commit f2dfe54c74f768a5bf78c9e5918918727f9d9459

Signed-off-by: Olaf Hering <olaf@aepfle.de>
---
 configure | 1 +
 1 file changed, 1 insertion(+)

diff --git a/configure b/configure
index 5d6f5a7f57..85f3662b8e 100755
--- a/configure
+++ b/configure
@@ -6305,6 +6305,7 @@ int main(void) {
     if (tmp != NULL) {
         return *(int *)(tmp + 2);
     }
+    return 1;
 }
 EOF
   if compile_prog "$CPU_CFLAGS -Werror -fsanitize=undefined" ""; then

Re: [PATCH v1] configure: fix malloc check
Posted by Richard Henderson 3 years, 9 months ago
On 7/7/20 10:13 AM, Olaf Hering wrote:
> Avoid random return value.
> 
> Fixes commit f2dfe54c74f768a5bf78c9e5918918727f9d9459
> 
> Signed-off-by: Olaf Hering <olaf@aepfle.de>
> ---
>  configure | 1 +
>  1 file changed, 1 insertion(+)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~