> > + if (count > sizeof(einj_buf)) Why not: /* Leave the last character for the NUL terminator */ if (count > sizeof(einj_buf) - 1) return -EINVAL; here. Then skip the min(...) addition below. -Tony
> > + if (count > sizeof(einj_buf)) Why not: /* Leave the last character for the NUL terminator */ if (count > sizeof(einj_buf) - 1) return -EINVAL; here. Then skip the min(...) addition below. -Tony
![]() |