device-port: Use pa_available_to_string
authorJoão Paulo Rechi Vita <jprvita@endlessm.com>
Mon, 13 Aug 2018 19:31:06 +0000 (12:31 -0700)
committerArun Raghavan <arun@arunraghavan.net>
Thu, 11 Oct 2018 13:08:41 +0000 (13:08 +0000)
Replace using the ternary operator with pa_available_to_string to print
value of a pa_available_t.

src/pulsecore/device-port.c

index 5cf4ac6..fb12772 100644 (file)
@@ -84,8 +84,7 @@ void pa_device_port_set_available(pa_device_port *p, pa_available_t status) {
 /*    pa_assert(status != PA_AVAILABLE_UNKNOWN); */
 
     p->available = status;
-    pa_log_debug("Setting port %s to status %s", p->name, status == PA_AVAILABLE_YES ? "yes" :
-       status == PA_AVAILABLE_NO ? "no" : "unknown");
+    pa_log_debug("Setting port %s to status %s", p->name, pa_available_to_string(status));
 
     /* Post subscriptions to the card which owns us */
     /* XXX: We need to check p->card, because this function may be called