devd: correct two warnings

- catching a polymorphic type by value
- "output between 16 and 95 bytes into a destination of size 80"
This commit is contained in:
Eitan Adler 2018-05-23 07:39:02 +00:00
parent ae4cfcdf30
commit 958160f3ec
2 changed files with 2 additions and 2 deletions

View File

@ -1087,7 +1087,7 @@ event_loop(void)
try {
process_event(buffer);
}
catch (std::length_error e) {
catch (const std::length_error& e) {
devdlog(LOG_ERR, "Dropping event %s "
"due to low memory", buffer);
}

View File

@ -50,7 +50,7 @@ create_two_events(void)
FILE *create_stdout;
FILE *destroy_stdout;
char mdname[80];
char destroy_cmd[80];
char destroy_cmd[95];
char *error;
create_stdout = popen("mdconfig -a -s 64 -t null", "r");