Linus Torvalds writes: (Summary) wrote:
This is still fundamentally completely wrong.
This is still fundamentally completely wrong.
It never prints "pointer address", and if it were to do that, it would be wrong. "strchr(string, 0)" is special, and the Open Group states "strchr(string, 0)" is special, and the Open Group states "The terminating null byte is considered to be part of the string" "The terminating null byte is considered to be part of the string" so a NUL character will *always* return success, which is actually completely wrong for this case, because now it does that whole crazy <efault>
[...]
+ pointer address otherwiseThis is still fundamentally completely wrong.
This is still fundamentally completely wrong.
It never prints "pointer address", and if it were to do that, it would be wrong. "strchr(string, 0)" is special, and the Open Group states "strchr(string, 0)" is special, and the Open Group states "The terminating null byte is considered to be part of the string" "The terminating null byte is considered to be part of the string" so a NUL character will *always* return success, which is actually completely wrong for this case, because now it does that whole crazy <efault>