Removed some unnecessary casts.
authorArmin Novak <armin.novak@thincast.com>
Thu, 5 Dec 2019 10:37:54 +0000 (11:37 +0100)
committerArmin Novak <armin.novak@thincast.com>
Thu, 5 Dec 2019 10:40:56 +0000 (11:40 +0100)
channels/audin/client/pulse/audin_pulse.c

index 4b3b4dc..4f31ddf 100644 (file)
@@ -525,13 +525,13 @@ UINT freerdp_audin_client_subsystem_entry(PFREERDP_AUDIN_DEVICE_ENTRY_POINTS pEn
 
        pa_context_set_state_callback(pulse->context, audin_pulse_context_state_callback, pulse);
 
-       if ((error = audin_pulse_connect((IAudinDevice*)pulse)))
+       if ((error = audin_pulse_connect(&pulse->iface)))
        {
                WLog_Print(pulse->log, WLOG_ERROR, "audin_pulse_connect failed");
                goto error_out;
        }
 
-       if ((error = pEntryPoints->pRegisterAudinDevice(pEntryPoints->plugin, (IAudinDevice*)pulse)))
+       if ((error = pEntryPoints->pRegisterAudinDevice(pEntryPoints->plugin, &pulse->iface)))
        {
                WLog_Print(pulse->log, WLOG_ERROR, "RegisterAudinDevice failed with error %" PRIu32 "!",
                           error);
@@ -540,6 +540,6 @@ UINT freerdp_audin_client_subsystem_entry(PFREERDP_AUDIN_DEVICE_ENTRY_POINTS pEn
 
        return CHANNEL_RC_OK;
 error_out:
-       audin_pulse_free((IAudinDevice*)pulse);
+       audin_pulse_free(&pulse->iface);
        return error;
 }