mirror of
https://github.com/servalproject/serval-dna.git
synced 2025-02-06 11:09:13 +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) \
|
#define DECLARE_SCHED_ENT(FUNCTION, VARIABLE) \
|
||||||
static void FUNCTION(struct sched_ent *alarm); \
|
static void FUNCTION(struct sched_ent *alarm); \
|
||||||
static struct profile_total VARIABLE##_timing={.name="" #FUNCTION "",}; \
|
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, };
|
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_requests, sched_requests);
|
||||||
DECLARE_SCHED_ENT(monitor_replies, sched_replies);
|
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 *fd_callbacks[MAX_WATCHED_FDS];
|
||||||
struct sched_ent *next_alarm=NULL;
|
struct sched_ent *next_alarm=NULL;
|
||||||
struct sched_ent *next_deadline=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")
|
#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 = {
|
static struct sched_ent mdp_sock = {
|
||||||
.function = overlay_mdp_poll,
|
.function = overlay_mdp_poll,
|
||||||
.stats = &mdp_stats,
|
.stats = &mdp_stats,
|
||||||
.poll.fd = -1,
|
.poll={.fd = -1,.events=0,.revents=0},
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct profile_total mdp_stats2 = { .name="mdp_poll2" };
|
static struct profile_total mdp_stats2 = { .name="mdp_poll2" };
|
||||||
static struct sched_ent mdp_sock2 = {
|
static struct sched_ent mdp_sock2 = {
|
||||||
.function = mdp_poll2,
|
.function = mdp_poll2,
|
||||||
.stats = &mdp_stats2,
|
.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);
|
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={
|
struct sockaddr_in addr={
|
||||||
.sin_family=AF_INET,
|
.sin_family=AF_INET,
|
||||||
.sin_port=htons(PORT_DNA),
|
.sin_port=htons(PORT_DNA),
|
||||||
|
.sin_addr={0},
|
||||||
};
|
};
|
||||||
struct scan_state *state = (struct scan_state *)alarm;
|
struct scan_state *state = (struct scan_state *)alarm;
|
||||||
uint32_t stop = state->last;
|
uint32_t stop = state->last;
|
||||||
|
@ -48,8 +48,7 @@ static struct profile_total read_timing={
|
|||||||
static struct sched_ent read_watch={
|
static struct sched_ent read_watch={
|
||||||
.function=olsr_read,
|
.function=olsr_read,
|
||||||
.stats=&read_timing,
|
.stats=&read_timing,
|
||||||
.poll.fd=-1,
|
.poll={.fd=-1,.events=POLLIN,.revents=0},
|
||||||
.poll.events=POLLIN,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
int olsr_init_socket(void){
|
int olsr_init_socket(void){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user