Skip to content

Commit b2a3ebb

Browse files
pbo-linarostsquad
authored andcommitted
tests/tcg/plugins/syscall: fix 32-bit build
Reviewed-by: Richard Henderson <[email protected]> Signed-off-by: Pierrick Bouvier <[email protected]> Message-Id: <[email protected]> Signed-off-by: Alex Bennée <[email protected]> Message-Id: <[email protected]>
1 parent d073706 commit b2a3ebb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/tcg/plugins/syscall.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,12 @@ static int64_t write_sysno = -1;
7676
static SyscallStats *get_or_create_entry(int64_t num)
7777
{
7878
SyscallStats *entry =
79-
(SyscallStats *) g_hash_table_lookup(statistics, GINT_TO_POINTER(num));
79+
(SyscallStats *) g_hash_table_lookup(statistics, &num);
8080

8181
if (!entry) {
8282
entry = g_new0(SyscallStats, 1);
8383
entry->num = num;
84-
g_hash_table_insert(statistics, GINT_TO_POINTER(num), (gpointer) entry);
84+
g_hash_table_insert(statistics, &entry->num, entry);
8585
}
8686

8787
return entry;
@@ -232,7 +232,7 @@ QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin_id_t id,
232232
}
233233

234234
if (!do_print) {
235-
statistics = g_hash_table_new_full(NULL, g_direct_equal, NULL, g_free);
235+
statistics = g_hash_table_new_full(g_int64_hash, g_int64_equal, NULL, g_free);
236236
}
237237

238238
if (do_log_writes) {

0 commit comments

Comments
 (0)