diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2022-02-26 18:07:16 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2022-03-07 13:09:20 +0000 |
commit | 1c6c3b764d992ecd9cb44f8646d74935269d20a6 (patch) | |
tree | ab2c83ba3a25238a713b0ba81b2f274a082f109f /util | |
parent | 9d662a6b22a0838a85c5432385f35db2488a33a5 (diff) | |
download | qemu-1c6c3b764d992ecd9cb44f8646d74935269d20a6.zip qemu-1c6c3b764d992ecd9cb44f8646d74935269d20a6.tar.gz qemu-1c6c3b764d992ecd9cb44f8646d74935269d20a6.tar.bz2 |
util: Make qemu_oom_check() a static function
The qemu_oom_check() function, which we define in both oslib-posix.c
and oslib-win32.c, is now used only locally in that file; make it
static.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 20220226180723.1706285-3-peter.maydell@linaro.org
Diffstat (limited to 'util')
-rw-r--r-- | util/oslib-posix.c | 2 | ||||
-rw-r--r-- | util/oslib-win32.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/util/oslib-posix.c b/util/oslib-posix.c index f2be732..ed5974d 100644 --- a/util/oslib-posix.c +++ b/util/oslib-posix.c @@ -199,7 +199,7 @@ fail_close: return false; } -void *qemu_oom_check(void *ptr) +static void *qemu_oom_check(void *ptr) { if (ptr == NULL) { fprintf(stderr, "Failed to allocate memory: %s\n", strerror(errno)); diff --git a/util/oslib-win32.c b/util/oslib-win32.c index af559ef..c87e697 100644 --- a/util/oslib-win32.c +++ b/util/oslib-win32.c @@ -44,7 +44,7 @@ /* this must come after including "trace.h" */ #include <shlobj.h> -void *qemu_oom_check(void *ptr) +static void *qemu_oom_check(void *ptr) { if (ptr == NULL) { fprintf(stderr, "Failed to allocate memory: %lu\n", GetLastError()); |