Remove a useless variable from the file descriptor array data type.
It was a cute idea to have the raw Ethernet layer use just one socket, but it ended up not working on some specific PTP time stamping hardware. Signed-off-by: Richard Cochran <richardcochran@gmail.com>master
parent
39b10a5a16
commit
0ca8143da5
4
clock.c
4
clock.c
|
@ -275,7 +275,7 @@ void clock_install_fda(struct clock *c, struct port *p, struct fdarray fda)
|
||||||
if (p == c->port[i])
|
if (p == c->port[i])
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
for (j = 0; j < fda.cnt; j++) {
|
for (j = 0; j < N_POLLFD; j++) {
|
||||||
k = N_POLLFD * i + j;
|
k = N_POLLFD * i + j;
|
||||||
c->pollfd[k].fd = fda.fd[j];
|
c->pollfd[k].fd = fda.fd[j];
|
||||||
c->pollfd[k].events = POLLIN|POLLPRI;
|
c->pollfd[k].events = POLLIN|POLLPRI;
|
||||||
|
@ -375,7 +375,7 @@ void clock_remove_fda(struct clock *c, struct port *p, struct fdarray fda)
|
||||||
if (p == c->port[i])
|
if (p == c->port[i])
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
for (j = 0; j < fda.cnt; j++) {
|
for (j = 0; j < N_POLLFD; j++) {
|
||||||
k = N_POLLFD * i + j;
|
k = N_POLLFD * i + j;
|
||||||
c->pollfd[k].fd = -1;
|
c->pollfd[k].fd = -1;
|
||||||
c->pollfd[k].events = 0;
|
c->pollfd[k].events = 0;
|
||||||
|
|
1
fd.h
1
fd.h
|
@ -35,7 +35,6 @@ enum {
|
||||||
|
|
||||||
struct fdarray {
|
struct fdarray {
|
||||||
int fd[N_POLLFD];
|
int fd[N_POLLFD];
|
||||||
int cnt;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
1
port.c
1
port.c
|
@ -546,7 +546,6 @@ static int port_initialize(struct port *p)
|
||||||
|
|
||||||
for (i = 0; i < N_TIMER_FDS; i++) {
|
for (i = 0; i < N_TIMER_FDS; i++) {
|
||||||
p->fda.fd[FD_ANNOUNCE_TIMER + i] = fd[i];
|
p->fda.fd[FD_ANNOUNCE_TIMER + i] = fd[i];
|
||||||
p->fda.cnt++;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (port_set_announce_tmo(p))
|
if (port_set_announce_tmo(p))
|
||||||
|
|
1
raw.c
1
raw.c
|
@ -190,7 +190,6 @@ static int raw_open(struct transport *t, char *name,
|
||||||
|
|
||||||
fda->fd[FD_EVENT] = efd;
|
fda->fd[FD_EVENT] = efd;
|
||||||
fda->fd[FD_GENERAL] = gfd;
|
fda->fd[FD_GENERAL] = gfd;
|
||||||
fda->cnt = 2;
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
no_timestamping:
|
no_timestamping:
|
||||||
|
|
Loading…
Reference in New Issue