diff options
author | Peter Maydell | 2019-08-21 17:59:22 +0200 |
---|---|---|
committer | Peter Maydell | 2019-08-21 17:59:22 +0200 |
commit | fe066b4848bab4f9365a419f3c8ba59ccecf67c0 (patch) | |
tree | 334a4800ad731a6b63fef671c7f275b14ce3d181 /tests | |
parent | Merge remote-tracking branch 'remotes/kraxel/tags/audio-20190821-pull-request... (diff) | |
parent | hw/display: Compile various display devices as common object (diff) | |
download | qemu-fe066b4848bab4f9365a419f3c8ba59ccecf67c0.tar.gz qemu-fe066b4848bab4f9365a419f3c8ba59ccecf67c0.tar.xz qemu-fe066b4848bab4f9365a419f3c8ba59ccecf67c0.zip |
Merge remote-tracking branch 'remotes/vivier2/tags/trivial-branch-pull-request' into staging
Various trivial fixes
# gpg: Signature made Wed 21 Aug 2019 12:19:11 BST
# gpg: using RSA key CD2F75DDC8E3A4DC2E4F5173F30C38BD3F2FBE3C
# gpg: issuer "laurent@vivier.eu"
# gpg: Good signature from "Laurent Vivier <lvivier@redhat.com>" [full]
# gpg: aka "Laurent Vivier <laurent@vivier.eu>" [full]
# gpg: aka "Laurent Vivier (Red Hat) <lvivier@redhat.com>" [full]
# Primary key fingerprint: CD2F 75DD C8E3 A4DC 2E4F 5173 F30C 38BD 3F2F BE3C
* remotes/vivier2/tags/trivial-branch-pull-request:
hw/display: Compile various display devices as common object
hw/display/sm501: Remove unused include
spapr_events: Rewrite a fall through comment
vl: Rewrite a fall through comment
target/ppc: Rewrite a fall through comment
hw/ipmi: Rewrite a fall through comment
hw/dma/omap_dma: Move switch 'fall through' comment to correct place
json: Move switch 'fall through' comment to correct place
hw/net/e1000: Fix erroneous comment
.gitignore: ignore some vhost-user* related files
configure: fix sdl detection using sdl2-config
configure: remove obsoleted $sparc_cpu variable
misc: fix naming scheme of compatiblity arrays
test: Use g_strndup instead of plain strndup
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/check-qjson.c | 2 | ||||
-rw-r--r-- | tests/migration/stress.c | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/tests/check-qjson.c b/tests/check-qjson.c index fa2afccb0a..07a773e653 100644 --- a/tests/check-qjson.c +++ b/tests/check-qjson.c @@ -767,7 +767,7 @@ static void utf8_string(void) if (*end == ' ') { end++; } - in = strndup(tail, end - tail); + in = g_strndup(tail, end - tail); str = from_json_str(in, j, NULL); g_assert(!str); g_free(in); diff --git a/tests/migration/stress.c b/tests/migration/stress.c index 49a03aab7b..d9aa4afe92 100644 --- a/tests/migration/stress.c +++ b/tests/migration/stress.c @@ -104,9 +104,9 @@ static int get_command_arg_str(const char *name, } if (end) - *val = strndup(start, end - start); + *val = g_strndup(start, end - start); else - *val = strdup(start); + *val = g_strdup(start); return 1; } @@ -126,10 +126,10 @@ static int get_command_arg_ull(const char *name, if (errno || *end) { fprintf(stderr, "%s (%05d): ERROR: cannot parse %s value %s\n", argv0, gettid(), name, valstr); - free(valstr); + g_free(valstr); return -1; } - free(valstr); + g_free(valstr); return 0; } |