aboutsummaryrefslogtreecommitdiff
path: root/linux-user
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2016-09-15 17:10:28 +0100
committerPeter Maydell <peter.maydell@linaro.org>2016-09-15 17:10:30 +0100
commit518352b601997723bd03d928d1bb5854648942e8 (patch)
treea46663616557d2584014c898c53db15665123658 /linux-user
parent9f16390cd3cdd85fa20739f07120f4d697c11837 (diff)
parentafe4c95331cea4c78cab3240594055a72aa5c30c (diff)
Merge remote-tracking branch 'remotes/mjt/tags/trivial-patches-fetch' into staging
trivial patches for 2016-09-15 # gpg: Signature made Thu 15 Sep 2016 13:40:55 BST # gpg: using RSA key 0x701B4F6B1A693E59 # gpg: Good signature from "Michael Tokarev <mjt@tls.msk.ru>" # gpg: aka "Michael Tokarev <mjt@corpit.ru>" # gpg: aka "Michael Tokarev <mjt@debian.org>" # Primary key fingerprint: 6EE1 95D1 886E 8FFB 810D 4324 457C E0A0 8044 65C5 # Subkey fingerprint: 7B73 BAD6 8BE7 A2C2 8931 4B22 701B 4F6B 1A69 3E59 * remotes/mjt/tags/trivial-patches-fetch: (21 commits) mptsas: change .realize function name linux-user/qemu.h: change malloc to g_malloc, free to g_free win32: don't run subprocess tests on Mingw32 platform sheepdog: remove useless casts fw_cfg: remove useless casts tricore: remove useless cast s390x: remove useless cast linux-user,s390x: remove useless cast coccinelle: add a script to remove useless casts curl: Operate on zero-length file Remove unused function declarations ivshmem: Delete duplicate debug message sh4: fix broken link to documentation MAINTAINERS: Fix up F: entry bit rot MAINTAINERS: Add include/sysemu/cpus.h MAINTAINERS: Add include/hw/sh4/ to SH4 section MAINTAINERS: Add include/hw/tricore/ to TriCore section MAINTAINERS: Add include/hw/unicore32/ to UniCore32 section ui/console: Fix non-working backspace key in monitor of gtk UI tcg: Remove duplicate header includes ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'linux-user')
-rw-r--r--linux-user/qemu.h4
-rw-r--r--linux-user/signal.c2
-rw-r--r--linux-user/syscall_defs.h4
3 files changed, 5 insertions, 5 deletions
diff --git a/linux-user/qemu.h b/linux-user/qemu.h
index bef465de4d..815447f5fc 100644
--- a/linux-user/qemu.h
+++ b/linux-user/qemu.h
@@ -548,7 +548,7 @@ static inline void *lock_user(int type, abi_ulong guest_addr, long len, int copy
#ifdef DEBUG_REMAP
{
void *addr;
- addr = malloc(len);
+ addr = g_malloc(len);
if (copy)
memcpy(addr, g2h(guest_addr), len);
else
@@ -574,7 +574,7 @@ static inline void unlock_user(void *host_ptr, abi_ulong guest_addr,
return;
if (len > 0)
memcpy(g2h(guest_addr), host_ptr, len);
- free(host_ptr);
+ g_free(host_ptr);
#endif
}
diff --git a/linux-user/signal.c b/linux-user/signal.c
index 9a4d894e3a..d3ac0e2565 100644
--- a/linux-user/signal.c
+++ b/linux-user/signal.c
@@ -4244,7 +4244,7 @@ static void setup_frame(int sig, struct target_sigaction *ka,
env->regs[5] = 0; // FIXME: no clue... current->thread.prot_addr;
/* Place signal number on stack to allow backtrace from handler. */
- __put_user(env->regs[2], (int *) &frame->signo);
+ __put_user(env->regs[2], &frame->signo);
unlock_user_struct(frame, frame_addr, 1);
return;
diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h
index 783565463f..c0c9b5887c 100644
--- a/linux-user/syscall_defs.h
+++ b/linux-user/syscall_defs.h
@@ -2329,8 +2329,8 @@ struct target_flock {
struct target_flock64 {
short l_type;
short l_whence;
-#if defined(TARGET_PPC) || defined(TARGET_X86_64) || defined(TARGET_MIPS) \
- || defined(TARGET_SPARC) || defined(TARGET_HPPA) \
+#if defined(TARGET_PPC) || defined(TARGET_X86_64) \
+ || defined(TARGET_MIPS) || defined(TARGET_SPARC) \
|| defined(TARGET_MICROBLAZE) || defined(TARGET_TILEGX)
int __pad;
#endif