mirror of
https://github.com/servalproject/serval-dna.git
synced 2025-01-29 15:43:56 +00:00
Initialize a few more uninitialized values.
This commit is contained in:
parent
6564449f49
commit
2c3c7527d3
@ -87,8 +87,8 @@ static int dna_helper_started = 0;
|
||||
|
||||
#define DECLARE_SCHED_ENT(FUNCTION, VARIABLE) \
|
||||
static void FUNCTION(struct sched_ent *alarm); \
|
||||
static struct profile_total VARIABLE##_timing={.name="" #FUNCTION "",}; \
|
||||
static struct sched_ent VARIABLE = {.function = FUNCTION, .stats = & VARIABLE##_timing, .poll.fd = -1, };
|
||||
static struct profile_total VARIABLE##_timing={.name="" #FUNCTION "",._next=NULL,._initialised=0,.max_time=0,.total_time=0,.child_time=0,.calls=0}; \
|
||||
static struct sched_ent VARIABLE = {.function = FUNCTION, .stats = & VARIABLE##_timing, .poll={.fd=-1, .events=0,.revents=0}};
|
||||
|
||||
DECLARE_SCHED_ENT(monitor_requests, sched_requests);
|
||||
DECLARE_SCHED_ENT(monitor_replies, sched_replies);
|
||||
|
@ -30,7 +30,7 @@ int fdcount=0;
|
||||
struct sched_ent *fd_callbacks[MAX_WATCHED_FDS];
|
||||
struct sched_ent *next_alarm=NULL;
|
||||
struct sched_ent *next_deadline=NULL;
|
||||
struct profile_total poll_stats={NULL,0,"Idle (in poll)",0,0,0};
|
||||
struct profile_total poll_stats={NULL,0,"Idle (in poll)",0,0,0,0};
|
||||
|
||||
#define alloca_alarm_name(alarm) ((alarm)->stats ? alloca_str_toprint((alarm)->stats->name) : "Unnamed")
|
||||
|
||||
|
@ -37,14 +37,14 @@ static struct profile_total mdp_stats = { .name="overlay_mdp_poll" };
|
||||
static struct sched_ent mdp_sock = {
|
||||
.function = overlay_mdp_poll,
|
||||
.stats = &mdp_stats,
|
||||
.poll.fd = -1,
|
||||
.poll={.fd = -1,.events=0,.revents=0},
|
||||
};
|
||||
|
||||
static struct profile_total mdp_stats2 = { .name="mdp_poll2" };
|
||||
static struct sched_ent mdp_sock2 = {
|
||||
.function = mdp_poll2,
|
||||
.stats = &mdp_stats2,
|
||||
.poll.fd = -1,
|
||||
.poll={.fd = -1,.events=0,.revents=0},
|
||||
};
|
||||
|
||||
static int overlay_saw_mdp_frame(struct overlay_frame *frame, overlay_mdp_frame *mdp, time_ms_t now);
|
||||
@ -893,6 +893,7 @@ static void overlay_mdp_scan(struct sched_ent *alarm)
|
||||
struct sockaddr_in addr={
|
||||
.sin_family=AF_INET,
|
||||
.sin_port=htons(PORT_DNA),
|
||||
.sin_addr={0},
|
||||
};
|
||||
struct scan_state *state = (struct scan_state *)alarm;
|
||||
uint32_t stop = state->last;
|
||||
|
@ -48,8 +48,7 @@ static struct profile_total read_timing={
|
||||
static struct sched_ent read_watch={
|
||||
.function=olsr_read,
|
||||
.stats=&read_timing,
|
||||
.poll.fd=-1,
|
||||
.poll.events=POLLIN,
|
||||
.poll={.fd=-1,.events=POLLIN,.revents=0},
|
||||
};
|
||||
|
||||
int olsr_init_socket(void){
|
||||
|
Loading…
x
Reference in New Issue
Block a user