trivial patches for 2025-02-14
-----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEZKoqtTHVaQM2a/75gqpKJDselHgFAmeu2oYACgkQgqpKJDse lHh57xAAstKzxMB7qJRfU9FHLT2KcSiCSesaGKVmwtaRzoSvf+m7DVSS0/DziEUl ha7Obs3zKSX8fIcClo7MiVXhs+7NOh7zeHK5xxD+U85yDrS3aBmU6NEHTUTZsarN ADjvMlhQBiElUbtEtNQg3oNp1n1bHhTpSWnbm+Se2QlALnECo1JAV+1DDC64Fi/h ZEhOcg4UWzoFgXli/CqLQ0SBGJLdD2KvHb2IHhP49l14vgVlMbd8CS8qfwfgqU6K sTdcO4NOIKWvLWNzrb5yvB473l0RGjbM4WzggwkL8WgxoOdwVqjtRkeOrmZI0MwR g9yLrb6WV4/01sXLbgh4uTpVxzouZ9w2F/8bTdEahmy8nR0yJ2DugDeg36oB2Mux vQTC7cbeV1eRKnTW0omguVybqeQ1mIvfBdjMR1D0GHX6y7d1ExCo4tap/AKBv4E9 +34eIq5mezE/AuFcigP//mQOY0pxnG9ahmYvNKb+30olOJzmBB0vSP15n0Ojjjn0 N/0mFmYg/P9000B8MqNrh3WaiTIKBvf98RGrqUgl4IqB3wnmBlFgY1TdI5ZcDKHK lWhV3+zdnzR0terkoiVwRGjaZYArsf2t21GaEsXhJjjuY+a+1CRGGwPTfBADbv8I FKKPpK0xXF4xdCVdGUA5FzUzTInS7j9AnhIOwOyp8q7dJDENF1k= =SPBO -----END PGP SIGNATURE----- Merge tag 'pull-trivial-patches' of https://gitlab.com/mjt0k/qemu into staging trivial patches for 2025-02-14 # -----BEGIN PGP SIGNATURE----- # # iQIzBAABCgAdFiEEZKoqtTHVaQM2a/75gqpKJDselHgFAmeu2oYACgkQgqpKJDse # lHh57xAAstKzxMB7qJRfU9FHLT2KcSiCSesaGKVmwtaRzoSvf+m7DVSS0/DziEUl # ha7Obs3zKSX8fIcClo7MiVXhs+7NOh7zeHK5xxD+U85yDrS3aBmU6NEHTUTZsarN # ADjvMlhQBiElUbtEtNQg3oNp1n1bHhTpSWnbm+Se2QlALnECo1JAV+1DDC64Fi/h # ZEhOcg4UWzoFgXli/CqLQ0SBGJLdD2KvHb2IHhP49l14vgVlMbd8CS8qfwfgqU6K # sTdcO4NOIKWvLWNzrb5yvB473l0RGjbM4WzggwkL8WgxoOdwVqjtRkeOrmZI0MwR # g9yLrb6WV4/01sXLbgh4uTpVxzouZ9w2F/8bTdEahmy8nR0yJ2DugDeg36oB2Mux # vQTC7cbeV1eRKnTW0omguVybqeQ1mIvfBdjMR1D0GHX6y7d1ExCo4tap/AKBv4E9 # +34eIq5mezE/AuFcigP//mQOY0pxnG9ahmYvNKb+30olOJzmBB0vSP15n0Ojjjn0 # N/0mFmYg/P9000B8MqNrh3WaiTIKBvf98RGrqUgl4IqB3wnmBlFgY1TdI5ZcDKHK # lWhV3+zdnzR0terkoiVwRGjaZYArsf2t21GaEsXhJjjuY+a+1CRGGwPTfBADbv8I # FKKPpK0xXF4xdCVdGUA5FzUzTInS7j9AnhIOwOyp8q7dJDENF1k= # =SPBO # -----END PGP SIGNATURE----- # gpg: Signature made Fri 14 Feb 2025 00:54:14 EST # gpg: using RSA key 64AA2AB531D56903366BFEF982AA4A243B1E9478 # gpg: Good signature from "Michael Tokarev <mjt@debian.org>" [unknown] # gpg: aka "Michael Tokarev <mjt@corpit.ru>" [unknown] # gpg: aka "Michael Tokarev <mjt@tls.msk.ru>" [unknown] # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: 9D8B E14E 3F2A 9DD7 9199 28F1 61AD 3D98 ECDF 2C8E # Subkey fingerprint: 64AA 2AB5 31D5 6903 366B FEF9 82AA 4A24 3B1E 9478 * tag 'pull-trivial-patches' of https://gitlab.com/mjt0k/qemu: make-release: don't rely on $CWD when excluding subproject directories target/riscv: Fix minor whitespace issue in riscv_cpu_properties qemu/timer: Clarify timer_new*() must be freed with timer_free() overall: Remove unnecessary g_strdup_printf() calls Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
commit
495de0fd82
@ -59,7 +59,7 @@ qcrypto_afalg_hash_format_name(QCryptoHashAlgo alg,
|
||||
if (is_hmac) {
|
||||
name = g_strdup_printf("hmac(%s)", alg_name);
|
||||
} else {
|
||||
name = g_strdup_printf("%s", alg_name);
|
||||
name = g_strdup(alg_name);
|
||||
}
|
||||
|
||||
return name;
|
||||
|
@ -1034,7 +1034,7 @@ void spapr_caps_add_properties(SpaprMachineClass *smc)
|
||||
for (i = 0; i < ARRAY_SIZE(capability_table); i++) {
|
||||
SpaprCapabilityInfo *cap = &capability_table[i];
|
||||
g_autofree char *name = g_strdup_printf("cap-%s", cap->name);
|
||||
g_autofree char *desc = g_strdup_printf("%s", cap->description);
|
||||
g_autofree char *desc = g_strdup(cap->description);
|
||||
|
||||
object_class_property_add(klass, name, cap->type,
|
||||
cap->get, cap->set,
|
||||
|
@ -507,6 +507,8 @@ static inline void timer_init_ms(QEMUTimer *ts, QEMUClockType type,
|
||||
* with an AioContext---each of them runs its timer callbacks in its own
|
||||
* AioContext thread.
|
||||
*
|
||||
* The timer returned must be freed using timer_free().
|
||||
*
|
||||
* Returns: a pointer to the timer
|
||||
*/
|
||||
static inline QEMUTimer *timer_new_full(QEMUTimerListGroup *timer_list_group,
|
||||
@ -530,6 +532,8 @@ static inline QEMUTimer *timer_new_full(QEMUTimerListGroup *timer_list_group,
|
||||
* and associate it with the default timer list for the clock type @type.
|
||||
* See timer_new_full for details.
|
||||
*
|
||||
* The timer returned must be freed using timer_free().
|
||||
*
|
||||
* Returns: a pointer to the timer
|
||||
*/
|
||||
static inline QEMUTimer *timer_new(QEMUClockType type, int scale,
|
||||
@ -548,6 +552,8 @@ static inline QEMUTimer *timer_new(QEMUClockType type, int scale,
|
||||
* associated with the clock.
|
||||
* See timer_new_full for details.
|
||||
*
|
||||
* The timer returned must be freed using timer_free().
|
||||
*
|
||||
* Returns: a pointer to the newly created timer
|
||||
*/
|
||||
static inline QEMUTimer *timer_new_ns(QEMUClockType type, QEMUTimerCB *cb,
|
||||
@ -566,6 +572,8 @@ static inline QEMUTimer *timer_new_ns(QEMUClockType type, QEMUTimerCB *cb,
|
||||
* associated with the clock.
|
||||
* See timer_new_full for details.
|
||||
*
|
||||
* The timer returned must be freed using timer_free().
|
||||
*
|
||||
* Returns: a pointer to the newly created timer
|
||||
*/
|
||||
static inline QEMUTimer *timer_new_us(QEMUClockType type, QEMUTimerCB *cb,
|
||||
@ -584,6 +592,8 @@ static inline QEMUTimer *timer_new_us(QEMUClockType type, QEMUTimerCB *cb,
|
||||
* associated with the clock.
|
||||
* See timer_new_full for details.
|
||||
*
|
||||
* The timer returned must be freed using timer_free().
|
||||
*
|
||||
* Returns: a pointer to the newly created timer
|
||||
*/
|
||||
static inline QEMUTimer *timer_new_ms(QEMUClockType type, QEMUTimerCB *cb,
|
||||
|
@ -128,7 +128,7 @@ static int plugin_add(void *opaque, const char *name, const char *value,
|
||||
/* Will treat arg="argname" as "argname=on" */
|
||||
fullarg = g_strdup_printf("%s=%s", value, "on");
|
||||
} else {
|
||||
fullarg = g_strdup_printf("%s", value);
|
||||
fullarg = g_strdup(value);
|
||||
}
|
||||
warn_report("using 'arg=%s' is deprecated", value);
|
||||
error_printf("Please use '%s' directly\n", fullarg);
|
||||
|
@ -11,8 +11,9 @@
|
||||
# See the COPYING file in the top-level directory.
|
||||
|
||||
function subproject_dir() {
|
||||
if test ! -f "subprojects/$1.wrap"; then
|
||||
error "scripts/archive-source.sh should only process wrap subprojects"
|
||||
if test ! -f "$src/subprojects/$1.wrap"; then
|
||||
echo "scripts/archive-source.sh should only process wrap subprojects"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Print the directory key of the wrap file, defaulting to the
|
||||
@ -26,7 +27,7 @@ function subproject_dir() {
|
||||
-e 's///p' \
|
||||
-e 'q' \
|
||||
-e '}' \
|
||||
"subprojects/$1.wrap")
|
||||
"$src/subprojects/$1.wrap")
|
||||
|
||||
echo "${dir:-$1}"
|
||||
}
|
||||
@ -76,7 +77,7 @@ popd
|
||||
exclude=(--exclude=.git)
|
||||
# include the tarballs in subprojects/packagecache but not their expansion
|
||||
for sp in $SUBPROJECTS; do
|
||||
if grep -xqF "[wrap-file]" subprojects/$sp.wrap; then
|
||||
if grep -xqF "[wrap-file]" $src/subprojects/$sp.wrap; then
|
||||
exclude+=(--exclude=subprojects/"$(subproject_dir $sp)")
|
||||
fi
|
||||
done
|
||||
|
@ -6166,7 +6166,7 @@ static void x86_cpu_list_entry(gpointer data, gpointer user_data)
|
||||
desc = g_strdup_printf("%s [%s]", model_id, cc->model->note);
|
||||
}
|
||||
if (!desc) {
|
||||
desc = g_strdup_printf("%s", model_id);
|
||||
desc = g_strdup(model_id);
|
||||
}
|
||||
|
||||
if (cc->model && cc->model->cpudef->deprecation_note) {
|
||||
|
@ -2844,9 +2844,9 @@ static const Property riscv_cpu_properties[] = {
|
||||
{.name = "cbop_blocksize", .info = &prop_cbop_blksize},
|
||||
{.name = "cboz_blocksize", .info = &prop_cboz_blksize},
|
||||
|
||||
{.name = "mvendorid", .info = &prop_mvendorid},
|
||||
{.name = "mimpid", .info = &prop_mimpid},
|
||||
{.name = "marchid", .info = &prop_marchid},
|
||||
{.name = "mvendorid", .info = &prop_mvendorid},
|
||||
{.name = "mimpid", .info = &prop_mimpid},
|
||||
{.name = "marchid", .info = &prop_marchid},
|
||||
|
||||
#ifndef CONFIG_USER_ONLY
|
||||
DEFINE_PROP_UINT64("resetvec", RISCVCPU, env.resetvec, DEFAULT_RSTVEC),
|
||||
|
@ -366,7 +366,7 @@ void st_set_trace_file(const char *file)
|
||||
/* Type cast needed for Windows where getpid() returns an int. */
|
||||
trace_file_name = g_strdup_printf(CONFIG_TRACE_FILE "-" FMT_pid, (pid_t)getpid());
|
||||
} else {
|
||||
trace_file_name = g_strdup_printf("%s", file);
|
||||
trace_file_name = g_strdup(file);
|
||||
}
|
||||
|
||||
st_set_trace_file_enabled(saved_enable);
|
||||
|
@ -1386,9 +1386,7 @@ char *qemu_console_get_label(QemuConsole *con)
|
||||
object_get_typename(c->device),
|
||||
c->head);
|
||||
} else {
|
||||
return g_strdup_printf("%s", dev->id ?
|
||||
dev->id :
|
||||
object_get_typename(c->device));
|
||||
return g_strdup(dev->id ? : object_get_typename(c->device));
|
||||
}
|
||||
}
|
||||
return g_strdup("VGA");
|
||||
|
3
ui/gtk.c
3
ui/gtk.c
@ -1944,8 +1944,7 @@ static GSList *gd_vc_vte_init(GtkDisplayState *s, VirtualConsole *vc,
|
||||
vcd->console = vc;
|
||||
|
||||
snprintf(buffer, sizeof(buffer), "vc%d", idx);
|
||||
vc->label = g_strdup_printf("%s", vc->vte.chr->label
|
||||
? vc->vte.chr->label : buffer);
|
||||
vc->label = g_strdup(vc->vte.chr->label ? : buffer);
|
||||
group = gd_vc_menu_init(s, vc, idx, group, view_menu);
|
||||
|
||||
vc->vte.terminal = vte_terminal_new();
|
||||
|
@ -234,7 +234,7 @@ int module_load(const char *prefix, const char *name, Error **errp)
|
||||
|
||||
search_dir = getenv("QEMU_MODULE_DIR");
|
||||
if (search_dir != NULL) {
|
||||
dirs[n_dirs++] = g_strdup_printf("%s", search_dir);
|
||||
dirs[n_dirs++] = g_strdup(search_dir);
|
||||
}
|
||||
dirs[n_dirs++] = get_relocated_path(CONFIG_QEMU_MODDIR);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user