[pulseaudio-commits] [Git][pulseaudio/pulseaudio][master] Fix expression with side effect in pa_assert
PulseAudio Marge Bot (@pulseaudio-merge-bot)
gitlab at gitlab.freedesktop.org
Thu Sep 30 08:51:04 UTC 2021
PulseAudio Marge Bot pushed to branch master at PulseAudio / pulseaudio
Commits:
e1899245 by Igor V. Kovalenko at 2021-09-30T11:20:52+03:00
Fix expression with side effect in pa_assert
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/641>
- - - - -
4 changed files:
- src/modules/bluetooth/module-bluez5-device.c
- src/pulsecore/card.c
- src/pulsecore/core.c
- src/pulsecore/dbus-util.c
Changes:
=====================================
src/modules/bluetooth/module-bluez5-device.c
=====================================
@@ -2513,10 +2513,10 @@ static int bluez5_device_message_handler(const char *object_path, const char *me
pa_bluetooth_profile_t profile;
const pa_a2dp_endpoint_conf *endpoint_conf;
const char *codec_name;
- struct userdata *u;
+ struct userdata *u = userdata;
bool is_a2dp_sink;
- pa_assert(u = (struct userdata *)userdata);
+ pa_assert(u);
pa_assert(message);
pa_assert(response);
=====================================
src/pulsecore/card.c
=====================================
@@ -467,10 +467,10 @@ int pa_card_suspend(pa_card *c, bool suspend, pa_suspend_cause_t cause) {
}
static int card_message_handler(const char *object_path, const char *message, const pa_json_object *parameters, char **response, void *userdata) {
- pa_card *c;
+ pa_card *c = userdata;
char *message_handler_path;
- pa_assert(c = (pa_card *) userdata);
+ pa_assert(c);
pa_assert(message);
pa_assert(response);
=====================================
src/pulsecore/core.c
=====================================
@@ -86,9 +86,9 @@ static char *message_handler_list(pa_core *c) {
}
static int core_message_handler(const char *object_path, const char *message, const pa_json_object *parameters, char **response, void *userdata) {
- pa_core *c;
+ pa_core *c = userdata;
- pa_assert(c = (pa_core *) userdata);
+ pa_assert(c);
pa_assert(message);
pa_assert(response);
pa_assert(pa_safe_streq(object_path, "/core"));
=====================================
src/pulsecore/dbus-util.c
=====================================
@@ -737,7 +737,7 @@ pa_proplist *pa_dbus_get_proplist_arg(DBusConnection *c, DBusMessage *msg, DBusM
pa_assert(msg);
pa_assert(iter);
- pa_assert(signature = dbus_message_iter_get_signature(iter));
+ pa_assert_se(signature = dbus_message_iter_get_signature(iter));
pa_assert_se(pa_streq(signature, "a{say}"));
dbus_free(signature);
View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/commit/e1899245703f1dfa3220af465046c287a5f1c2ba
--
View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/commit/e1899245703f1dfa3220af465046c287a5f1c2ba
You're receiving this email because of your account on gitlab.freedesktop.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/pulseaudio-commits/attachments/20210930/2005007e/attachment-0001.htm>
More information about the pulseaudio-commits
mailing list