On 09/18, Oleg Nesterov wrote:
>
> On 09/18, Roland McGrath wrote:
> >
> > It's doubtful that rolling your own single loop actually performs better
> > than just calling strlen and memcpy.

Ah, I misread your message, sorry...

> This is needed to advance 'name' if d_path() fails with !ENAMETOOLONG.
> Probably needs a comment.
>
> Or perhaps 'filename = ""' case can handle this case itself. In this
> case we do not even need strlen(), remaining = name - filename.

Yes, but you strlen + memcpy as you suggested will work too.

Oleg.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to