]> code.delx.au - pulseaudio/commitdiff
protocol-native: Remove redundant asserts
authorArun Raghavan <arun.raghavan@collabora.co.uk>
Mon, 19 Mar 2012 08:59:59 +0000 (14:29 +0530)
committerArun Raghavan <arun.raghavan@collabora.co.uk>
Mon, 19 Mar 2012 08:59:59 +0000 (14:29 +0530)
As David points out, the previous commit made a couple of asserts
redundant (the XOR covers all cases that were previous tested for).
Remove these redundant commits now.

src/pulsecore/protocol-native.c

index 9a437ffbfe56c61b52179ba82692e244b812cab9..41fc0a023ad60ba513342a7df21eb5201221e25e 100644 (file)
@@ -4697,8 +4697,6 @@ static void command_set_sink_or_source_port(pa_pdispatch *pd, uint32_t command,
 
     CHECK_VALIDITY(c->pstream, c->authorized, tag, PA_ERR_ACCESS);
     CHECK_VALIDITY(c->pstream, !name || pa_namereg_is_valid_name_or_wildcard(name, command == PA_COMMAND_SET_SINK_PORT ? PA_NAMEREG_SINK : PA_NAMEREG_SOURCE), tag, PA_ERR_INVALID);
-    CHECK_VALIDITY(c->pstream, idx != PA_INVALID_INDEX || name, tag, PA_ERR_INVALID);
-    CHECK_VALIDITY(c->pstream, idx == PA_INVALID_INDEX || !name, tag, PA_ERR_INVALID);
     CHECK_VALIDITY(c->pstream, (idx != PA_INVALID_INDEX) ^ (name != NULL), tag, PA_ERR_INVALID);
     CHECK_VALIDITY(c->pstream, port, tag, PA_ERR_INVALID);