lib/uaudio-rtp.c: Squidge up the socket-closing code.
authorMark Wooding <mdw@distorted.org.uk>
Mon, 4 May 2020 18:30:39 +0000 (19:30 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Tue, 5 May 2020 22:18:28 +0000 (23:18 +0100)
I plan to add another one, and the commonality in the code gets lost if
it's written out vertically.

lib/uaudio-rtp.c

index 2efd910..825018e 100644 (file)
@@ -448,12 +448,8 @@ static void rtp_start(uaudio_callback *callback,
 
 static void rtp_stop(void) {
   uaudio_thread_stop();
-  close(rtp_fd);
-  rtp_fd = -1;
-  if(rtp_fd6 >= 0) {
-    close(rtp_fd6);
-    rtp_fd6 = -1;
-  }
+  close(rtp_fd); rtp_fd = -1;
+  if(rtp_fd6 >= 0) { close(rtp_fd6); rtp_fd6 = -1; }
 }
 
 static void rtp_configure(void) {