Only trim the trailing newline if the output from ctime() was not
truncated. To simplify the code, use strlcpy() instead of snprintf()
since strlcpy() can't fail with a negative size (and the previous code
probably didn't handle those errors properly given the int -> size_t
conversion).
Details
Details
- Reviewers
imp - Commits
- rG10ed5b90e46f: mfiutil: Handle truncation in mfi_next_learn_time
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable