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
master
Peter Maydell 2022-02-26 18:07:16 +00:00
parent 9d662a6b22
commit 1c6c3b764d
3 changed files with 2 additions and 4 deletions

View File

@ -26,8 +26,6 @@
int qemu_main(int argc, char **argv, char **envp);
#endif
void *qemu_oom_check(void *ptr);
ssize_t qemu_write_full(int fd, const void *buf, size_t count)
QEMU_WARN_UNUSED_RESULT;

View File

@ -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));

View File

@ -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());