dpeth: resolve Coverity warnings
This commit is contained in:
parent
6e3824d78b
commit
6199f090c8
1 changed files with 5 additions and 4 deletions
|
@ -87,7 +87,7 @@ static void dp_confaddr(dpeth_t * dep)
|
|||
int ix;
|
||||
long val;
|
||||
|
||||
strcpy(ea_key, "DPETH0_EA");
|
||||
strlcpy(ea_key, "DPETH0_EA", sizeof(ea_key));
|
||||
ea_key[5] += de_instance;
|
||||
|
||||
for (ix = 0; ix < SA_ADDR_LEN; ix++) {
|
||||
|
@ -114,7 +114,7 @@ static void update_conf(dpeth_t * dep, const dp_conf_t * dcp)
|
|||
char ec_key[16];
|
||||
long val;
|
||||
|
||||
strcpy(ec_key, "DPETH0");
|
||||
strlcpy(ec_key, "DPETH0", sizeof(ec_key));
|
||||
ec_key[5] += de_instance;
|
||||
|
||||
dep->de_mode = DEM_SINK;
|
||||
|
@ -216,7 +216,8 @@ static void do_first_init(dpeth_t *dep, const dp_conf_t *dcp)
|
|||
* automatically. Return the IRQ line number when an interrupt occurs.
|
||||
*/
|
||||
dep->de_hook = dep->de_irq;
|
||||
sys_irqsetpolicy(dep->de_irq, 0 /*IRQ_REENABLE*/, &dep->de_hook);
|
||||
if (sys_irqsetpolicy(dep->de_irq, 0 /*IRQ_REENABLE*/, &dep->de_hook) != OK)
|
||||
panic("unable to set IRQ policy");
|
||||
dep->de_int_pending = FALSE;
|
||||
sys_irqenable(&dep->de_hook);
|
||||
|
||||
|
@ -241,7 +242,7 @@ static void do_init(const message * mp)
|
|||
confnr = MIN(de_instance, DP_CONF_NR-1);
|
||||
|
||||
dcp = &dp_conf[confnr];
|
||||
strcpy(dep->de_name, DevName);
|
||||
strlcpy(dep->de_name, DevName, sizeof(dep->de_name));
|
||||
dep->de_name[4] = '0' + de_instance;
|
||||
|
||||
if (dep->de_mode == DEM_DISABLED) {
|
||||
|
|
Loading…
Reference in a new issue