Skip to content

Commit b939ff4

Browse files
committed
Remove unused variable, catch an error if ctrl_sock->type is
bogus.
1 parent 2cdddf4 commit b939ff4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/rtpp_controlfd.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ static int
6565
controlfd_init_systemd(void)
6666
{
6767
#ifdef HAVE_SYSTEMD_DAEMON
68-
int nfd, controlfd;
68+
int nfd;
6969

7070
nfd = sd_listen_fds(0);
7171
if (nfd > 1) {
@@ -264,6 +264,9 @@ rtpp_controlfd_init(const struct rtpp_cfg *cfsp)
264264
}
265265
controlfd_out = controlfd_in;
266266
break;
267+
default:
268+
warnx("unhandled RTPC_XXX type: %d", ctrl_sock->type);
269+
abort();
267270
}
268271
if (controlfd_in < 0 || controlfd_out < 0) {
269272
return (-1);

0 commit comments

Comments
 (0)