Fix errors found by Coverity Static Analysis.
Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>master
parent
e3a9535dff
commit
7894339cdd
2
clock.c
2
clock.c
|
@ -401,7 +401,7 @@ struct clock *clock_create(int phc_index, struct interface *iface, int count,
|
||||||
enum timestamp_type timestamping, struct defaultDS *ds,
|
enum timestamp_type timestamping, struct defaultDS *ds,
|
||||||
enum servo_type servo)
|
enum servo_type servo)
|
||||||
{
|
{
|
||||||
int i, fadj = 0, max_adj, sw_ts = timestamping == TS_SOFTWARE ? 1 : 0;
|
int i, fadj = 0, max_adj = 0.0, sw_ts = timestamping == TS_SOFTWARE ? 1 : 0;
|
||||||
struct clock *c = &the_clock;
|
struct clock *c = &the_clock;
|
||||||
char phc[32];
|
char phc[32];
|
||||||
struct interface udsif;
|
struct interface udsif;
|
||||||
|
|
3
config.c
3
config.c
|
@ -341,6 +341,9 @@ int config_read(char *name, struct config *cfg)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
current_port = config_create_interface(port, cfg);
|
current_port = config_create_interface(port, cfg);
|
||||||
|
if (current_port < 0) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
1
port.c
1
port.c
|
@ -1678,6 +1678,7 @@ struct port *port_open(int phc_index,
|
||||||
pr_err("port %d: PHC device mismatch", number);
|
pr_err("port %d: PHC device mismatch", number);
|
||||||
pr_err("port %d: /dev/ptp%d requested, but /dev/ptp%d attached",
|
pr_err("port %d: /dev/ptp%d requested, but /dev/ptp%d attached",
|
||||||
number, phc_index, checked_phc_index);
|
number, phc_index, checked_phc_index);
|
||||||
|
free(p);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue