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
This commit is contained in:
parent
9d662a6b22
commit
1c6c3b764d
@ -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;
|
||||
|
||||
|
@ -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));
|
||||
|
@ -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());
|
||||
|
Loading…
Reference in New Issue
Block a user